1.

What Is The Datacontext Class And How Is It Related To Linq?

Answer»

After you ADD a LINQ to SQL Classes item to a project and open the O/R Designer, the EMPTY design surface represents an empty DataContext class ready to be configured. The DataContext class is a LINQ to SQL class that acts as a conduit between a SQL Server database and the LINQ to SQL entity classes mapped to that database. This class contains the CONNECTION string information and the methods for CONNECTING to a database and manipulating the data in the database. It is configured with connection information provided by the first item that is dragged onto the design surface.

After you add a LINQ to SQL Classes item to a project and open the O/R Designer, the empty design surface represents an empty DataContext class ready to be configured. The DataContext class is a LINQ to SQL class that acts as a conduit between a SQL Server database and the LINQ to SQL entity classes mapped to that database. This class contains the connection string information and the methods for connecting to a database and manipulating the data in the database. It is configured with connection information provided by the first item that is dragged onto the design surface.



Discussion

No Comment Found