Division of Domain Models and MetadataSource Possible?

2 posts, 1 answers
  1. gstenstrom
    gstenstrom avatar
    27 posts
    Member since:
    Jun 2015

    Posted 25 Aug 2015 Link to this post

    I discovered in the directions for Code Only Mapping that the Models and the MetadataSource must be in the same project. I had them in separate projects at one point but was getting "... no metadata has been registered for class telerik ... " exceptions. Once I put them in the same project that error went away (others are taking it's place -- I'm learning). Ideally I would prefer to keep my models in a business objects/logic project, separate from my data and mapping logic. It sounds like I will need to either ... 

    1. Put the models in the Data Access project ... or ... 
    2. Include references to the data access framework in my business layer in order to move the MetadataSource logic into the Business Logic project.

    Is that correct or am I overlooking something? Another pattern perhaps?




  2. Answer
    Ady avatar
    588 posts

    Posted 28 Aug 2015 Link to this post

    Hi Gary,

    From an architecture perspective it makes sense to segregate your class model into a separate project than your business logic.
     The  DataAccess mapping for the 'class model' is then closely coupled with the model and should ideally be in the same project.
    You would then need references to the DataAccess libraries in projects that consume your class model.

    Hope this clarifies things a bit. Do get back in case you need further assistance.

    Check out the latest announcement about Telerik Data Access vNext as a powerful framework able to solve core development problems.
  3. DevCraft banner
Back to Top