How to Select Data Record in LINQ from table
Below code snippets in C# get the all contacts data records from ABCWorks database
ABCWorksDataContext dataContext = new ABCWorksDataContext();
var query = from contact in dataContext.Contacts
select contact;
Here ABCWorksDataContext represent Database Entity model. Contacts represent collection of data records. dataContext.Contacts represent the Object of table Contact.
query is type of variant that represent contact collection.
Comments
Post a Comment