When building a test framework it is sometimes useful to be able to write test code against
DbSet<T> objects. Since
IDbSet<T> it is relatively easy to wire up a mock for your entity. Before we jump in let’s go over an important concept in the Moq framework.