Referencing Model Base class in another project/assembly

Thread is closed for posting
2 posts, 1 answers
  1. Gary
    Gary avatar
    28 posts
    Member since:
    Jun 2015

    Posted 17 Sep 2015 Link to this post

    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.


  2. Answer
    Ady avatar
    589 posts

    Posted 22 Sep 2015 Link to this post

    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.

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