August 2008 - Posts

1
Comments

Linq To SQL Optimizes Eager Loading by zhirani

If you have read my previous blog posting about the Load operator in entity framework and how it works in terms of lazy loading object regardless if it object has been tracked earlier, you must be keen to know how does this behavior work with Linq to...
2
Comments

Avoiding Roundtrip with Load in Entity Framework by zhirani

If you have queries in your classes that you are reusing across your entire business layer, it becomes really hard sometimes to do eager loading of certain child entities on those queries. For example, if you have method that runs a complex linq to entity...
0
Comments

Comparing Dates in Linq To SQL by zhirani

If you want to compare dates in Linq to SQL query, you are free to use normal operators available in C# and Linq to SQL provider will translate the date comparison into appropriate SQL which makes uses of date functions available on SQL server. To demonstrate...
27
Comments

Many To Many Mappings in Entity Framework by zhirani

So far in my previous blog postings, I have discovered goodness with linq to SQL as I travel the path of migrating from linq to SQL to entity framework. This is not to deny that entity framework also has plus points which cannot be ignored. Among them...
1
Comments

Entity Framework Does not support object comparison in Queries by zhirani

As I continue to migrate my linq to SQL code over to entity framework, I am discovering more constraints that I never faced working with linq to SQL. For instance in one of my linq query, I was able to do object comparison to apply filter to queries....
3
Comments

Different Implementation of Cast in Linq To SQL And Entity Framework by zhirani

To set the stage of what I am going to blog about, I would recommend that you read by earlier blog posting here where I have talked about how the cast operator works. In short when you use cast operator with Linq to SQL to fetch a particular concrete...
1
Comments

Entity Framework does not support Custom Properties in Queries by zhirani

As I am starting to learn more and more, I think linq to sql first release is much more mature that v1 release of entity framework. For instance, in linq to sql, if I would create custom property in my partial class, I could actually use that custom property...
11
Comments

Single Table Inheritance in Entity Framework by zhirani

In this blog posting, I will do a walk through of how to apply single table inheritance using entity framework. Entity framework supports 3 different models of inheritance. Table Per Hierarchy (Single Table Inheritance) Table Per Type Table Per Concrete...
12
Comments

Changing Namespaces in Entity Framework by zhirani

If you are like me, migrating to entity framework from linq to SQL, I must say you have been spoiled. What seemed to be very simple has gotten much more complex. I find that Entity framework solved my persistence ignorance problem but brought me much...
0
Comments

MultipleActiveResultSets in EntityFramework by zhirani

MultipleActiveResultSets was a feature introduced in the connectionstring with ado.net 2.0. In prior versions of ado.net, you can only execute a single query at a time on a particular open connection. When you set MultipleActiveResultSets to true, you...
More Posts Next page »