Expression Vs Function in Entity Framework

Sometimes developers don’t know whether they should use a Func<> or an Expression<Func<>> with the Entity Framework and LINQ. The difference may be critical in same situations. Let’s say that you have a metod that perform a query with a where condition made as this: public IEnumerable<MyEntity> LoadMyEntities(string parameter) { return Context.MyEntities.Where(x=>x.sameValue==parameter); } If you have to use the […]

Continue Reading