I was trying to implement a LINQ 2 SQL implementation to one of my page to load the data to a datagrid.The below is the code
using (NorthwindDataContext context = new NorthwindDataContext())
{
var customers =from c in context.Customers select c; // Line 1
gridViewCustomers.DataSource = customers;
gridViewCustomers.DataBind();
}
I put a break point in the Line 1 to examine what type is being loaded into customer .But i couldn't see anything there. What type this customer is of ?
I wanted to put the code to fetch data from Tables in my data access layer which is a seperate classlibrary and would like to call it from UI.What should be the return type of my method in Data access layer ? I already have a another class library which holds buisness objects/entities (Ex: Student).I was using this with Normal ADO.NET stuff before using the LINQ 2SQL stuff.How can i make it work altogether .Kindly advice