I got this issue:
Product class in a SQLBackend that implements IProduct interface.
I also got a Product in SAPBackend (ERP, accounting software) that implements the same IProduct.
Both backend is in a different project.
I want to be able to use pass a Product between this two project so I need the same common interface.
I was thinking placing IProduct in a common interface project but if had many common cases would that lead quite many interfaces in that project. And if just lead to that I expose those interfaces to quite many projects
I wonder if there is a better case so SAPBackend and SQLBackend stand by them self and still share a common interface?
namespace Interfaces
{
public interface IProduct
{
string name {set; get;}
}
}
namespace Sqlbackend
{
public class Product : IProduct
{
public string name { set; get; }
}
}
namespace ERPbackend
{
public class Product : IProduct
{
public string name { set; get; }
}
}