public GroupsController(IdentityManagementDbContext context) { _context = context; if (_context.Groups.Count() == 0) { _context.Groups.Add(new Group { Name = "Security Council" }); _context.SaveChanges(); } }
public UsersController(IdentityManagementDbContext context) { _context = context; _handler = new UserHandler(_context); _repository = new UsersRepository(_context); _events = new UsersEventRepository(_context); if (_context.Users.Count() == 0) { _context.Users.Add(new User { FirstName = "Fred", LastName = "Flintstone" }); _context.SaveChanges(); } }
public UsersEventRepository(IdentityManagementDbContext context) { _context = context; }
public UserHandler(IdentityManagementDbContext context) { _context = context; _repository = new UsersEventRepository(_context); }