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

Referencing Model Base class in another project/assembly

1 Answer 54 Views
Data Access Free Edition
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 17 Sep 2015, 03:26 PM

I have two projects ... BLL & CORE. All my models and MetadataSource files are hosted in the BLL project. In an effort to restructure and organize a bit I moved a base class, used by the entity models,  from the BLL project to the CORE project. After re-wring I was able to build the CORE project fine and the BLL project stopped complaining about broken references. However, now the BLL layer errors on the build wit the following message ... 

 

"BModelBase class found as persistent base type but is not enhanced. Maybe this class is in a referenced assembly which needs to be enhanced".

 

So after researching I realize that the CORE project ALSO needs to have references made to the Telerik ​DataAccess ​package; particularly the Fluent package. After installing these, however I continue to receive the same error. I have compared the references to the "enhancer" between both projects. Since it was working in the BLL project I assume that these setting must also be valid for the CORE projects as well. They were both identical. 

I am not sure what else the problem could be or where else to look to find the fix. A Google search turned up remarkably very little information on this error.

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Ady
Telerik team
answered on 22 Sep 2015, 12:45 PM
Hello Gary,

I am sorry for the inconvenience you experience.

The error you experience appears because the base class is in a separate assembly, and unfortunately, such a scenario is not supported out-of the-box with Telerik Data Access. Therefore, the recommended approach to the situation is to place the base class in the assembly that holds the model.

I hope this helps. In case you have additional questions or need assistance, do not hesitate to get back to us.

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