none
Best architecture to make use of EF4.1 code first RRS feed

  • Question

  • Hi all,

     

    I suppose the real question is, which of these is the best architecture, with an up-vote to EF4.1 code first.

     

    I have an application, made up of many components, that is being developed from scratch.

    Following on from the StockTrader example for Unity:

    I have stocks, news and document management components, each with their own UI and business projects. 

     

    Should I create an Entity Framework model for each component within its own data project, or one data repository that contains one entity model for the whole database?

    There will only be one database on SQL Server 2008 R2.

     

    As you can probably tell, this part if pretty new to me!

    If anyone has any advice it would be much appreciated! :-)

    Tuesday, July 5, 2011 8:53 PM

Answers

  • Hello,

    both approaches are pretty valid and it really depends on the way how you want to make your application structured and if these modules should be considered as standalone or as one block. Working with single model is much simpler but sometimes correct approach is having multiple models.

    Best regards,
    Ladislav

    • Marked as answer by Michael_PB Friday, July 15, 2011 8:02 PM
    Tuesday, July 5, 2011 10:08 PM

All replies

  • Hello,

    both approaches are pretty valid and it really depends on the way how you want to make your application structured and if these modules should be considered as standalone or as one block. Working with single model is much simpler but sometimes correct approach is having multiple models.

    Best regards,
    Ladislav

    • Marked as answer by Michael_PB Friday, July 15, 2011 8:02 PM
    Tuesday, July 5, 2011 10:08 PM
  • Thanks Ladislav,

     

    I suspected that would be the case.

     

    I am going to create seperate models.

    It may take longer, but future growth of the application with be easier.

     

    Thanks

    Friday, July 15, 2011 8:03 PM