Category: Entity Framework

Dec 16

How to: Improve the performance of the Entity Framework

After writing code using entity framework for sometime and seeing the code base continue to grow I realized the importance of coding with performance in mind. There are things that come to mind like eager loading, but that alone won’t do much as your application continues to grow. Below are some key best practices I …

Continue reading »

Dec 02

Entity Framework 4: Any way to know the plural form of an Entity Type?

While working on a project I came across the need to identify what the entity set name is so I can use that to add an updated entity to the set. In order to identify the plural I came up with two options: Use the Pluralization service to figure out the entity set name: The …

Continue reading »

Nov 27

Entity Framework – Why can’t I see the child entities of my entity

So currently I’m working on an entity model in which there are a lot of parent – child relationships and for obvious reasons the entity framework is a great choice to build that entity model. However, I’ve ran into the issue that although in the database several of this relationships already exist, when trying to …

Continue reading »

Nov 27

LINQ to Entities does not recognize the method ‘get_Item(Int32)’ method.

When using the entity framework you may come across an error message such as this: “LINQ to Entities does not recognize the method ‘get_Item(Int32)’ method, and this method cannot be translated into a store expression.” After doing some research the root cause of this issue was that in Linq I was trying to resolve a …

Continue reading »