Base solution for your next web application
Open Closed

Custom Repositories Implementation #1493


User avatar
0
moetarhini created

Hi,

We are trying to create a project based on ASPNET Zero module, and we need to use Custom Repositories for our Models. We used the built-in DI mechanism to inject this repository in the Domain Service, and then call it in the Application service. However, We are getting this error "Declaration referenced in a method implementation cannot be a final method." in the Castel Windsor library (DynamicProxyGenAssembly2).

Is this a familiar issue faced before? We followed the following link for guidance [http://www.aspnetboilerplate.com/Pages/Documents/Repositories]) Section: Custom Repositories

[http://www.aspnetboilerplate.com/Pages/Documents/EntityFramework-Integration#DocCustomRepositoryMethods])

Thank you Moe


2 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    We haven't got such an error before. It might be because of referencing different versions of same dll in different projects in your solution.

    Can you share your custom repository, domain service and app service methods ? So, we can try to catch same exception.

  • User Avatar
    0
    moetarhini created

    <cite>ismcagdas: </cite> Hi,

    We haven't got such an error before. It might be because of referencing different versions of same dll in different projects in your solution.

    Can you share your custom repository, domain service and app service methods ? So, we can try to catch same exception.

    Thank you for your reply, Actually we thought first that this might be due to different DLL versions, yet the problem was resolved by rewriting the Domain and Application service classes following step by step the guide.

    Thank you for your help, much appreciated. Moe