public UnitOfWork(TodoContext context) { _context = context; TodoItems = new TodoItemRepository(_context); Labels = new LabelRepository(_context); TodoItemLabels = new TodoItemLabelRepository(_context); }
public TodoController(UserManager <ApplicationUser> userManager, ITodoRepository repository, ITodoItemLabelRepository labelRepository) { _userManager = userManager; _repository = repository; _labelRepository = labelRepository; }