Rhino Mock Entity Framework using UnitofWork Pattern not working
This is my first attempt at something like this, so hopefully this is simple. I have created a WCF service which uses Entity Framework to access the database. I have implemented a UnitOfWork interface so my service can use EF while still being testable. Here is my service: public class ProjectService : IProjectService { private IUnitOfWork db = null; public ProjectService(IUnitOfWork unitofwork) { db = unitofwork; } public int RegisterSite(int CPUID) { if (db.Servers.Count(x => x.CPUID == CPUID) > 0) { // do something } return 0; } } Here is my UnitOfWork interface: public interface