Runtime AOP tools

Runtime AOP tools create decorator/proxy classes dynamically at runtime. These classes are built by examining the signature of classes/interfaces along with an interception aspect that you’ve written, then generate a decorator class. Typically, these tools are part of IoC containers, as such containers allow you to use these generated classes transparently. My goal in this […]

Continue Reading

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