1 Replies - 237 Views - Last Post: 03 May 2013 - 03:38 AM Rate Topic: -----

#1 ray1234  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 148
  • Joined: 07-September 12

Question on layering

Posted 03 May 2013 - 03:12 AM

I'm following the onion architecture, where Data Access Layer, Testing, and UI depend on the centre core layers. application service(business layer) and domain layer.

I'm a little confuse on which layer to put the entity framework in.

Data Access Layer

  • Database(mdf)
  • Entity Framework(edmx)




Domain Layer

  • DBCONTEXTModels Folder - classes that inherit from DBCONTEXT and used to access the database
  • App Config - point to database
  • Model.tt - contain all clr classe/entites
  • model1.context.tt


the problem I have is my models in Domain layer can't retrieve metadata from the entity framework. so when I move the framework, to the domain layer. I get another error as I need to put the database mdf file with the EF or reference to it, which I can't as the Domain Layer souldn't have a dependency on DataAccessLayer.

so How do I go about restructuring this?

thanks,

ray

This post has been edited by ray1234: 03 May 2013 - 03:13 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Question on layering

#2 ray1234  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 148
  • Joined: 07-September 12

Re: Question on layering

Posted 03 May 2013 - 03:38 AM

I solved this now. the domain layer should only contain abstraction. and the dataaccessLayer implement the abstraction.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1