private DbSet <T> _context; // field yarattik ve generic T'yi _context icine gonderdik public BaseService() { db = new BookStoreEntities(); _context = db.Set <T>(); }
private void CreateMockOfRepository() { _bookStoreEntities = Substitute.For <BookStoreEntities>(); _bookStoreEntities.Set <T>().Returns(mockDbSet); Repository = new EFGenericRepository <T>(_bookStoreEntities); }
public void SetUp() { _bookEntities = Substitute.For <BookStoreEntities>(); _bookEntities.Set <Book>().Returns(BookFake.GetBookDbSet()); _repository = new EFGenericRepository <Book>(_bookEntities); }