• Entity Framework 6 What's new ?

    EF6 is still in alpha stages but you can go grab it now via nuget. What is new ? A whole lot find about it here EF6

    Also, do read this post about migrating to EF6 if you are migrating an existing application.

    EF6 Migration

    I am basically using the same model to see if life is any easier with V6. The model is fairly simple. There are users, users can questions and questions are of different types. A user creates Test which is composed of many questions.

    Earlier, there was no easy way of doing Enum in EF Code First. That limitation is no longer there. Now, the questions can be of varying difficulty levels so now we can do the following.

    Read more...


  • Entity Framework - Generic repository Pattern - Part 1

    • Part 1 - Generic Repositry Pattern
    • Part 2 - Generic Repositry Pattern Contd.

    The generic repository pattern has been a matter of discussion on the forums and SO. Developers are not convinced that it solves a problem, yet everyday SO has more questions about the pattern. Clearly, something is not right. I tried to implement the pattern in a way I thought fit. I changed my mind a million times during the process, that tells you that the process was not smooth. You can find several implementations of the pattern scattered all over the internet. I will not pass a opinion on the pattern. I would rather tell you what issues I faced and I how solved (or not) them.

    Read more...


  • Entity Framework Complex Types

    In complicated models we need complex types to satisfy complex business logic .The most simple example would be having address as a complex type. Complex types are objects with no identity of their own. They are dependent on the parent for their existence. Consider the case where address has no real significance if it is not associated with a customer. This also implies that lazy loading of the complex type is not possible.

    Read more...


  • Entity Framework Inhertiance

    Inheritance is the basic requirement when we go about making a model for our business. Inheritance in SQL based systems is restricted to “has a “relationships. In real world applications which are modeled in object oriented mechanisms this is the real paint point for the developers. The essence of ORM systems is to bridge the gap between these two worlds and allow a seamless layer of abstraction to exist for the database access.

    Read more...