public UnitOfWork(ApplicationDbContext context) { _context = context; TodoItem = new TodoItemRepository(context); TodoList = new TodoListItemRepository(context); AbsenceGate = new AbsenceRepository(context); TodoItemCategoryGate = new TodoCategoryRepository(context); User = new UserRepository(context); CompanyGate = new CompanyRepository(context); }
public void SetUp() { _items = new List <TodoListItem> { new TodoListItem { Id = new Guid("00000000000000000000000000000001"), Description = "Walk the dog", IsCompleted = false, IsDeleted = false }, new TodoListItem { Id = new Guid("00000000000000000000000000000002"), Description = "Wash the cat", IsCompleted = false, IsDeleted = false } }; _repository = new TodoListItemRepository(_items); }
public TodoListItemController(GenericRepository <TodoListItem> repository) { Repository = (TodoListItemRepository)repository; }