Esempio n. 1
0
 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();
 }
Esempio n. 2
0
 public Repository(BlogAppContext context)
 {
     _context = context;
     _dbSet   = context.Set <T>();
 }