Entity Framework and non database objects RRS feed

  • Question

  • User2043512157 posted


    As I explained in recent posts I'm starting to experiment with the entity framework, albeit in a very small way.

    I use the famework to create classes for all my database views at present that I build to my businessobjects namespace.  Obviously I have other objects that do not originate from the database  which I currently create manually. Is this something that should continue outside of the framework or is there ways of managing these classes inside the framework?



    Tuesday, February 14, 2012 4:31 AM


  • User-1240674726 posted


    i think your "handmade" classes should be outside the EF scope.

    The classes created by EF are the DB model representation, with all the methods you need to perform CRUD, and I assume the other classes dont.

    If you want you can create aditional text templates files so that EF can use those to create new classes with whatever code you want, so for example if identify some code  that is transversal to all the classes you can create a text template file that generates it.

    If you want to take a look at code genaration go to Oleg Sych page, i found it very useful!.

    Hope it helps!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 14, 2012 4:48 AM