objectset

Entity Framework 4.0 - Including entities - Eager loading problem

We have 3 tables in our db that each have an entity in our edmx. To illustrate my problem, imagine 3 tables: Table: Make Fields: makeID make Table: Model FIelds: modelID makeID foreign key model Table: Car carID modelID foreign key car Our Make, Model, and Car entity have all of the navigation properties in the entity model. La...

Get Objects from an ObjectSet by specifying a Range in EF

Hi all, I am trying out EF 4.0.I have an Employee Object and using EF I am getting the Employee ObjectSet by simply calling Context.Employees Now the above call will spit following sql query select * from Employees The above query works fine and I don't have any complains on it however as you know this will not be performant...

Entity Framework: ObjectSet and its (generics) variance

I use: EntityFramework + POCO Here is the thing: public interface IBaseType { int Id { get; set; } } public class BaseType : IBaseType { public virtual int Id { get; set; } } public class DerivedType : BaseType { } The problem: public class EntityFetcher<T> where T : BaseType { public object GetById(int id) { ...

Attach additional ObjectSets to ObjectContext from separate project

Hi, I hope this makes sense. I have a ASP.NET web application that uses Entity Framework. I have added a couple of custom tables to the db and created a separate project to handle the CRUD operations for those tables. I chose the separate project because I don't want future upgrades to the application to overwrite my custom features. ...