View Single Post
  #5 (permalink)  
Old November 6th, 2012, 04:33 PM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 71,632, Level: 100
Points: 71,632, Level: 100 Points: 71,632, Level: 100 Points: 71,632, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,011
Thanks: 79
Thanked 1,576 Times in 1,553 Posts
Default

It depends on how you want to implement it. You could use the EF classes Picture and PhotoAlbum as your business entities and extend them (using partial classes) with additional functionality. However, that still ties them closely to the Entity Framework and thus to the database.

A common solution for this is to use EF Code First where you define your model classes first, and let EF handle database interaction. You then create repositories to handle stuff like getting items and updating them.

Google for EF Code First to learn a lot more.

I am working on an article series on N-Layered design using EF Code First. ETA: Unknown ;-)

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote