Part 2: LINQ Tips & Tricks [Things to get you started efficiently]

This blog entry is in continuation with my first post on Part 1: LINQ Tips & Tricks [Things to get you started efficiently]

Continuing to share some other important tips that you can take care of while developing with LINQ.

[9] Loading Options while working with tables in Relationships

You always need to struggle for performance as a LINQ Developer; perhaps because to understand better how internal mechanism works.

using (BEDataContext context = new BEDataContext())
{
    var customers = from cust in context.Customers
                    select cust;
    foreach (var customer in customer)
        Response.Write(customer.CustomerAddresses.Count().ToString());
}

Read More…

Follow

Get every new post delivered to your Inbox.