Please suggest me how to develop N-Tier Layer for WCF Service by using Entity framework 6.0.. Suggest me exposing Entities as datacontract is good or bad? RRS feed

  • Question

  • Could you please help in creating N-Tier Arch for WCF Service which will uses Entity framework 6.0 for data access.

    I have worked in Creating N-Tier Arch for WCF using Software factory with Enterprise library....for data access and exception logging in database as well as in file system

    But am really confused whether I can expose the Entities which generated as part of the Entity framework in the WCF Service data contract... also suggest me how to implement other activities like exception logging in database using the entity framework...

    If possible please guide me by creating Sample or demo N-TIER Arch for WCF using Entity framework...

    I have seen lot of articles saying need to use repository pattern when using Entity framework

    • Do we really need to implement or use repository pattern when using Entity framework

    Is using Trackable Entities a good idea for WCF? Also please explain how the Trackable Entities works?

    Wednesday, May 14, 2014 11:34 AM


  • Most just leave the EF entitles behind mapping them over to DTO(s) Data Transfer Objects that are Datacontracts to WCF and send the DTO(s) through the WCF service and the tiers, and the DAL is siting behind the WCF service.. The DTO(s) are typically created in a classlib project called Entitles. And all projects have reference to the Entities project in N-tier.


    • Marked as answer by Fred Bao Thursday, May 22, 2014 8:30 AM
    Wednesday, May 14, 2014 8:02 PM