public DbSetMock <TEntity> CreateDbSetMock <TEntity>(Expression <Func <TDbContext, DbSet <TEntity> > > dbSetSelector, IEnumerable <TEntity> initialEntities = null)
            where TEntity : class
        {
            var entityKeyFactory = _keyFactoryBuilder.BuildKeyFactory <TEntity>();

            return(CreateDbSetMock(dbSetSelector, entityKeyFactory, initialEntities));
        }
 public DbSetMock <TEntity> CreateDbSetMock <TEntity>(Expression <Func <TDbContext, DbSet <TEntity> > > dbSetSelector, IEnumerable <TEntity> initialEntities = null)
     where TEntity : class
 => CreateDbSetMock(
     dbSetSelector,
     _keyFactoryBuilder.BuildKeyFactory <TEntity>(),
     initialEntities);