Entity Framework UnitOfWork

I am using the UnitOfWork pattern with EF 4 and I am just wondering where the EFUnitOfWork implementation should work? Should he live in a vault? I have all my interfaces in the domain layer. Does this sound right?

I am using Ninject to input repositories using IUnitOfWork.

I think it really doesn't matter, since you are not going to really test your EF repositories correctly?

Another option is to make it live in the data layer where the models and the EF context are located.

Having it at the Repository Level, this layer now needs a reference to System.Data.Entity. Is it good or bad?

+3
source share
2 answers

DDD ProjectName.Core . :

  • ProjectName.Core β†’ ( )

  • ProjectName.Core β†’ DomainModel

  • ProjectName.Core β†’ β†’ IUnitOfWork (uow interface)

  • ProjectName.Core β†’ β†’ DtatAccess ( , , uow)

, , ProjectName.Infrastructure.DataAccess DataAccess .

+1

/ . .

- ,

 - Domain
   ->Interfaces
   ->Repository
      -> Actual Implementation 

, , , . - , .

0

All Articles