This is a migrated thread and some comments may be shown as answers.

Division of Domain Models and MetadataSource Possible?

1 Answer 33 Views
Development (API, general questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Gary
Top achievements
Rank 1
Gary asked on 25 Aug 2015, 07:38 PM

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?

 

Thanks,

G

1 Answer, 1 is accepted

Sort by
0
Accepted
Ady
Telerik team
answered on 28 Aug 2015, 10:43 AM
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.

Regards,
Ady
Telerik
 
Check out the latest announcement about Telerik Data Access vNext as a powerful framework able to solve core development problems.
Tags
Development (API, general questions)
Asked by
Gary
Top achievements
Rank 1
Answers by
Ady
Telerik team
Share this question
or