This project has moved and is read-only. For the latest updates, please go here.

Entity Framework in NSK

Topics: Developer Forum
Jun 3, 2010 at 4:27 PM
Do you have any examples of using the Entity Framework in the NSK project? Thanks!
Jun 14, 2010 at 3:29 PM

I'm working on the implementation of the DAL based on EF4: although it's still far from being usable, you can have a look at the "ManagedDesigns.Nsk.Data.EF" project


Jun 14, 2010 at 3:47 PM

Thanks Andy! I saw that you put an EF project in there, not sure it'll help me right now but I look forward to seeing it when you get it functioning. I'm building a DAL right now and I'd really like to use EF. So, I'm going to use your book as a guide and try to replace NHibernate with EF and put an interface on my object context so my business layer will implement the DAL by using the interface...We'll see how far I get.

Thanks for all of your hard work!



Jul 5, 2010 at 3:32 PM

Hi Dan, as of the last changeset, I committed a working DAL based on EF4. Feedback is welcome :-)


Jul 9, 2010 at 8:22 PM

Andy, thanks for getting EF included in the project! I have a couple of questions.

1) You have two EF projects...What's the difference between the two?

2) What is the Configuration classes for, do they manage property validations?

3) Why do you have repositories on both EF projects?

4) Not related to EF but about the Business Layer. I'm struggling with the difference between the Business Layer and the Service Layer (Domain Model Pattern). In your book you say the Service Layer lives between the Presentation and Business Layers. Okay, so what handles CRUD for your Entities in the BL? I thought...for instance you have User.cs and it's a POCO so you need a Business Object to handle it's CRUD operations. Is that object called UserServices.cs? Is UserServices.cs part of the BL or SL? I thought it was part of the BL and the SL will have another object that will use UserServices.cs to do whatever the Presentation Layer needs to do. Know what I mean?





Jul 23, 2010 at 9:54 AM

Im also interested in the difference between the 2 EF projects.

Some comments either in code or in changesets would be appreciated.


Jul 25, 2010 at 11:37 PM
mny_dk wrote:

Im also interested in the difference between the 2 EF projects.

The 2 EF projects are intended to show 2 different ways to map a domain onto a database: the one containing "POCO" within the name is based on a "classic" EDMX file, while the other one uses the "code first" toolkit which allows to map a domain writing code to express the mappings. At the moment, only the POCO DAL is already working: I'll update the other one in order to use the recently released CTP4 of the code first toolkit