示例#1
0
 public UnitOfWork()
 {
     _context = new MyVolunteerAppContext();
     _context.Database.EnsureCreated();
     UserRepository  = new UserRepository(_context);
     GuildRepository = new GuildRepository(_context);
 }
示例#2
0
 public UserRepository(MyVolunteerAppContext context)
 {
     _context = context;
 }
 public GuildRepository(MyVolunteerAppContext context)
 {
     _context = context;
 }