Base solution for your next web application
Open Closed

need to add WCF Service #915


User avatar
0
engwalid created

Hi, I need to add WCF Service to isolate between Application layer and Entities layers because Application layer cannot access Database direct because it will be on another Servers

Thanks, Appreciate your quick response


6 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    In this case, you have 2 options:

    1 - Do not use repositories, use your own abstractions to communicate to remote server via REST or another way. 2 - Use repositories as before but implement them to work with a remote source.

    You can also use OData for remote calls.

  • User Avatar
    0
    engwalid created

    Ok, I kept Repositories and i added WCF Project to solution and I need to use functions in Application Solution , but the problem that i face is create object from repository to be passes to ApplicationService.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Don't you create your ApplicationService with dependency injection ? In that way, repositories will be created by dependency injection too.

  • User Avatar
    0
    hikalkan created
    Support Team

    As I understand, you created custom repository implementation. If so, you should register them to IOC manager.

  • User Avatar
    0
    douglasbustos created

    <cite>hikalkan: </cite> In this case, you have 2 options:

    1 - Do not use repositories, use your own abstractions to communicate to remote server via REST or another way. 2 - Use repositories as before but implement them to work with a remote source.

    You can also use OData for remote calls.

    We need the same. Please share the solution.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    We haven't tried creating a WCF service and we dont have the solution. Maybe @engwalid can share the solution.

    If you want to use OData, you can check this documentation <a class="postlink" href="http://aspnetboilerplate.com/Pages/Documents/OData-Integration">http://aspnetboilerplate.com/Pages/Docu ... ntegration</a>