// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, IGenericEFRepository <PandaAccountDbContext> genericEFRepo) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { //todo production exception app.UseDeveloperExceptionPage(); } app.UseAuthentication(); app.UseHttpsRedirection(); //TODO : config upon policy , now allow auto migration //genericEFRepo.Context().Database.Migrate(); app.UseMiddleware <AuthenticationMiddlewareCustom>(); app.UseMvc(routes => { routes.MapRoute(name: "default", template: "{controller}/{action}/{id?}"); }); }
public AccountFacade( IGenericEFRepository <MsSql1DbContext> genericEFRepo, IAccountService accountService, SignInManager <GenericUser> signInManager, UserManager <GenericUser> userManager ) { _signInManager = signInManager; _userManager = userManager; _genericEFRepo = genericEFRepo; _accountService = accountService; }
public static Task <GenericUserContract> GetById(IGenericEFRepository <MsSql1DbContext> _genericEFRepo, int IdentityUser) { Expression <Func <GenericUser, bool> > predicate = p => p.Id == IdentityUser; Expression <Func <GenericUser, GenericUserContract> > selector = s => new GenericUserContract { Id = s.Id, Email = s.Email, FirstName = s.FirstName, LastName = s.LastName, OnlineStatus = s.OnlineStatus }; var response = _genericEFRepo.GetQueryAble <GenericUser>() .Where(predicate) .Select(selector) .FirstOrDefaultAsync(); return(response); }
public CartController(IGenericEFRepository rep) { _rep = rep; }
public GenPublishersController(IGenericEFRepository rep) { _rep = rep; }
public ProductController(IGenericEFRepository rep) { _rep = rep; }
public ReviewController(IGenericEFRepository rep) { _rep = rep; }
public GenBooksController(IGenericEFRepository rep) { _rep = rep; }
public ConversationFacade(IGenericEFRepository <MsSql1DbContext> genericEFRepo, IConversationService contactService) { _genericEFRepo = genericEFRepo; _conversationService = contactService; }
public UserRepository(IGenericEFRepository <PandaUserDbContext> repo) { _repo = repo; }
public AccountRepository(IGenericEFRepository <PandaAccountDbContext> repo) { _repo = repo; }
public GenSurveyQuestionDetailController(IGenericEFRepository rep) { _rep = rep; }