Linked Questions

Popular Questions

DbSet Not available in Nunit

Asked by At

I am trying to do Mock test of a function which is invoking Entity db set. e.g.

Customer c= appcontext.Customer  (w=> w.custid=11).tolist();

in my Unit test I am trying to follow the steps as per https://docs.microsoft.com/en-us/ef/ef6/fundamentals/testing/mocking

However when I am trying to do

var mockSet = new Mock<DbSet<Customer >>();

Visual studio can not find DbSet . I have included System.Data.Entity

help needed. Thanks.

Related Questions