View Single Post
  #1 (permalink)  
Old December 11th, 2010, 12:55 PM
ksouthworth ksouthworth is offline
Authorized User
 
Join Date: Dec 2010
Posts: 23
Thanks: 3
Thanked 2 Times in 2 Posts
Default Changes needed for Linq2Sql Repository?

Hi Scott,
Really enjoyed the book, great stuff.

I was wondering what changes would be needed to the code to use a Linq2Sql repository (or some other persistence technology like SubSonic, EntityFramework, etc). It seems that NHibernate does a very good job of letting you code "model first" using regular POCO objects, and the separation of concerns in the Agatha's code is great. However, Linq2Sql takes more of a "database-first" approach and generates classes/objects from your database schema. Is it still possible to use the Agatha's Storefront Model project/classes with a persistence mechanism other than NHibernate? If so, I'd be very interested to see what code changes would be needed.

I'm wondering if I should just bite the bullet and learn NHibernate, but I've been trying out Mindscape LightSpeed (http://www.mindscapehq.com/products/...d/default.aspx) and like it so far, and was curious how the Agatha's code might be different if it was not using NHibernate. Would the strict separation of layers not be possible with something other than NHib?

Thanks again for a great book.
Reply With Quote