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

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

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.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • 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.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • 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.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    hikalkan created
    Support Team

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

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • 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.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • 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>

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)