public static void Initialize(IServiceProvider provider) { _context = provider.GetRequiredService <TheRoomContext>(); _userManager = provider.GetRequiredService <UserManager <ApplicationUser> >(); _roleManager = provider.GetRequiredService <RoleManager <IdentityRole> >(); _hostingEnvironment = provider.GetRequiredService <IHost>(); }
public TheRoomRepository(TheRoomContext context) { this.context = context; dbSet = context.Set <TEntity>(); }