• Base WCF Service architecture Northwind sample

    This posting is for a WCF solution I use in creating all my commercial WCF services.

    The key feature about it is how we use a provider interface so that we can dynamically change our data provider on the fly.

    This sample interfaces with the Northwind database.

    The solution is broken out in layers.

    First we have the ServiceContracts project where that contains the service contracts our services use.

    Next our ServiceImplementation layer as the name implies, implements the endpoints of our Service Interfaces.

    We have the ProviderContracts assembly which conatins our data provider interfaces which our BLL classes implement. This assembly contains a class called ProviderFactory which is responsible for finding the BLL assembly defined in the web.config file and caching it.

    Our BusinessLogic project which contains the Business logic of the service and interfaces with the data provider of our choice. In this case we are using Linq To Sql.

    I'll post more about this solution at a later time. Right now I'm short on time so I'm just going to attach the solution for everyone to take a look at.

    Update 2/28/11 - Attached a Visual Studio Project Template for this solution. (NST WCF Layered Solution.zip)

    If you want to change the project names, edit the WCFSolution.vstemplate.

    NST WCF Layered Solution.zip

    NSV.NW.Service - Copy.Rar is a copy of a working Visual Studio solution. You'll just need to set the reference paths to compile.

    NSV.NW.Service - Copy.rar