public UnitOfWork(Repository <Blog> blogRepository, Repository <Category> categoryRepository, Repository <Comment> commentRepository, Repository <Role> roleRepository, Repository <User> userRepository) { _blogRepository = blogRepository; _categoryRepository = categoryRepository; _commentRepository = commentRepository; _roleRepository = roleRepository; _userRepository = userRepository; _context = new BlogAppContext(); }
public Repository(BlogAppContext context) { _context = context; _dbSet = context.Set <T>(); }