dimanche 19 mars 2017

Contract library as a repository

I am working on a C# project that is comprised by the Clients project (Clients.csproj) I have a DAL library that gets data for clients from the database (Products.DAL.csproj). Inside Products.DAL.SQL.csproj I have an interface IProductsService which has a method GetProducts() (reads product from MS SQL database). Now I have the requirement to add an extra data source so I created another project (Products.DAL.Mongo.csproj). I need to implement IProductsService interface in this new project but I dont want to reference the Products.DAL.SQL.csproj to get the interface. What is the recommended way of doing this?

Thanks in advance

Aucun commentaire:

Enregistrer un commentaire