public TripService(IApplicationDbContext dbContext, ICurrentUserService currentUserService, IDistanceCalculatorService distanceCalculatorService) { _dbContext = dbContext; if (currentUserService != null && currentUserService.UserId != null) { _applicationUser = _dbContext.Users.SingleOrDefault(u => u.Id == currentUserService.UserId); } _distanceCalculatorService = distanceCalculatorService; }
public CommentsController(IApplicationDbContext applicationDbContext, IPostRepository postRepository, IUserRepository userRepository) : base(applicationDbContext) { _postRepository = postRepository; _userRepository = userRepository; }
public AccountService(IApplicationDbContext dbContext, UserManager<ApplicationUser> userManager) { _dbContext = dbContext; _userManager = userManager; _userManager.UserValidator = new UserValidator<ApplicationUser>(_userManager) { AllowOnlyAlphanumericUserNames = false }; _userManager.PasswordValidator = new PasswordValidator { RequiredLength = 6, RequireNonLetterOrDigit = true, RequireDigit = false, RequireLowercase = false, RequireUppercase = false, }; }
public AircraftTypeController(IApplicationDbContext dbContext) { db = dbContext; }
protected BaseDbReadOnlyStore(IApplicationDbContext applicationDbContext) { ApplicationDbContext = applicationDbContext; }
public AirportController(IApplicationDbContext dbContext) { db = dbContext; }
public ExportTodosQueryHandler(IApplicationDbContext context, IMapper mapper, ICsvFileBuilder fileBuilder) { _context = context; _mapper = mapper; _fileBuilder = fileBuilder; }
public EFMotionRepository(IApplicationDbContext dbContext) { this.dbContext = dbContext; }
public PollsController() { db = new ApplicationDbContext(); }
public BaseApiController(IApplicationDbContext applicationDbContext) { ApplicationDbContext = applicationDbContext; }
public GetTodoItemsWithPaginationQueryHandler(IApplicationDbContext context, IMapper mapper) { _context = context; _mapper = mapper; }
public DeleteEmployeeCommandHandler(IApplicationDbContext context, ICurrentUserService currentUserService, IIdentityService userManager) { _context = context; _currentUserService = currentUserService; _userManager = userManager; }
public GetArchivedQueryHandler(IApplicationDbContext context) { _context = context; }
public UsersFilterHandler(IApplicationDbContext context, IMapper mapper) { _context = context; _mapper = mapper; }
public DeleteFinanceYearCommandHandler(IApplicationDbContext context) { _context = context; }
public UpdateTodoListCommandHandler(IApplicationDbContext context) { _context = context; }
public UpdateListingCommandHandler(IApplicationDbContext context, IMapper mapper) { _context = context; _mapper = mapper; }
public HomeController(IApplicationDbContext appContext) { m_databaseContext = appContext; }
public CowEventRepository(IApplicationDbContext context) { _context = context; }
public TagRepository(IApplicationDbContext db) { _db = db; }
public QuestionsController() { db = new ApplicationDbContext(); }
public DeleteTagCommandHandler(IApplicationDbContext context, IStringLocalizer <TagsResource> localizer) { _context = context; _localizer = localizer; }
public TransactionController() { db = new ApplicationDbContext(); }
public CreateTagCommandHandler(IApplicationDbContext context, IStringLocalizer <TagsResource> localizer, IMapper mapper) { _context = context; _localizer = localizer; _mapper = mapper; }
public SockRepository(IApplicationDbContext context) { _users = context.Users; _socks = context.Socks; _context = context; }
public GetSeguimientoIndividualQueryHandler(IApplicationDbContext context, IMapper mapper) { _context = context; _mapper = mapper; }
public static Address ResolveAddress(this Trip trip, IApplicationDbContext dbContext, string userId, Address address) { if (address != null && address.Id > 0) { return dbContext.Addresses.SingleOrDefault(a => a.User.Id == userId && a.Id == address.Id); } return null; }
public DeleteFantasyTeamHandler(IApplicationDbContext dbContext) { _dbContext = dbContext; }
public SearchController(IApplicationDbContext applicationDbContext) : base(applicationDbContext) { }
public CreateSchoolClassCommandHandler(IApplicationDbContext context, IMapper mapper) { _context = context; _mapper = mapper; }
public AircraftTypeController() { db = new ApplicationDbContext(); }
public GetCatalogItemByIdQueryHandler(IApplicationDbContext context) { _context = context; }
public LikeController(IApplicationDbContext applicationDbContext, IPostRepository postRepository) : base(applicationDbContext) { _postRepository = postRepository; }
public GetObservacionQueryHandler(IApplicationDbContext context, IMapper mapper, IMediator mediator) { _context = context; _mapper = mapper; _mediator = mediator; }
public AccountService(IApplicationDbContext dbContext) : this(dbContext, new UserManager<ApplicationUser>( new UserStore<ApplicationUser>( (DbContext) dbContext ))) { }
public ReportRepository(IApplicationDbContext dbContext) : base(dbContext) { }
public PizzaRepository(IApplicationDbContext context) { _users = context.Users; _context = context; _pm = new List<PizzaModel>(); }
public Handler(IApplicationDbContext context) =>
public CategoriesModule(IApplicationDbContext ctx) { Get["/categories"] = _ => { var categories = ctx.Categories.ToList(); return View["index", categories]; }; Get["/category/new"] = _ => { var category = new Category(); return View["new", category]; }; Post["/category/new"] = parameters => { var category = this.Bind<Category>(); if (category != null) { ctx.Categories.Add(category); ctx.SaveChanges(); return Response.AsRedirect("/categories"); } return 500; }; Get["/category/update/{id:guid}"] = _ => { var id = new Guid(_.id); var category = ctx.Categories.Where(x => x.Id == id).FirstOrDefault(); if(category != null) { return View["update", new Category() { Name = category.Name, Id = category.Id}]; } return 404; }; Post["/category/update"] = parameters => { Category category = this.Bind<Category>(); if(category != null) { ctx.SetModified(category); ctx.SaveChanges(); return Response.AsRedirect("/categories"); } return 404; }; Get["/category/delete/{id:guid}"] = _ => { var id = new Guid(_.id); if (ctx.Categories.Any(x => x.Id == id)) { ViewBag.CategoryId = id; return View["delete"]; } return 404; }; Post["/category/deleteconfirmed"] = _ => { Category category = this.Bind<Category>(); if (category != null) { var dbCategory = ctx.Categories.Where(x => x.Id == category.Id).FirstOrDefault(); ctx.Categories.Remove(dbCategory); ctx.SaveChanges(); return Response.AsRedirect("/categories"); } return 404; }; }
public GetDailyTransactionDetailsQueryHandler(IApplicationDbContext context, IMapper mapper) { _context = context; _mapper = mapper; }
public QuestionsController(IApplicationDbContext dbContext) { db = dbContext; }
public PeopleRepository(IApplicationDbContext context, IDateTimeUtil dateTimeUtil) : base(context, dateTimeUtil) { }
public PollsController(IApplicationDbContext dbContext) { db = dbContext; }
public GetAllCRMTuyenDocQueryHandler(IApplicationDbContext applicationDbContext, IMapper mapper) { _applicationDbContext = applicationDbContext; _mapper = mapper; }
public TransactionController(IApplicationDbContext dbContext) { db = dbContext; }
public CheckingAccountService(IApplicationDbContext dbContext) { db = dbContext; }
public AccountController(IApplicationDbContext<Supplier, int> suppliers, IApplicationDbContext<Contact, int> contacts) { _suppliers = suppliers; _contacts = contacts; _logger = LogManager.GetCurrentClassLogger(); }
public ValidationController(IApplicationDbContext dbContext) { this.dbContext = dbContext; }
public DeleteAddressCommandHandler(IApplicationDbContext context) { _context = context; }
public CompanyRepository(IApplicationDbContext db) : base(db) { }
public PreguntasEvaluacionCommandHandler(IApplicationDbContext context, IConfiguration configuration) { _context = context; _config = configuration; }
public CreateTodoItemCommandHandler(IApplicationDbContext context) { _context = context; }
public static Car ResolveCar(this Trip trip, IApplicationDbContext dbContext, string userId, Car car) { if (car != null && car.Id > 0) { return dbContext.Cars.SingleOrDefault(c => c.User.Id == userId && c.Id == car.Id); } return null; }
public UpdateContactCommandHandler(IApplicationDbContext context) { _context = context; }
public AirportController() { db = new ApplicationDbContext(); }
public RemoveJoinRoleCommandHandler(IApplicationDbContext context) { _context = context; }
public CarService(IApplicationDbContext dbContext, ICurrentUserService currentUserService) { _dbContext = dbContext; if (currentUserService != null && currentUserService.UserId != null) { _applicationUser = _dbContext.Users.SingleOrDefault(u => u.Id == currentUserService.UserId); } }
public SmashAttributeTypeService(IApplicationDbContext db, IResultValidationService resultValidationService) : base(db, resultValidationService) { }
protected QueryHandlerBase(IApplicationDbContext dbContext) { _context = dbContext; }
public GigRepository(IApplicationDbContext context) { _context = context; }