public static void Initialize(CampContext context) { if (!context.Vouchers.Any()) { context.Vouchers.AddRange( new Voucher { Name = "Первая летняя смена", StartDate = new DateTime(2021, 06, 01), Price = 21000 }, new Voucher { Name = "Вторая летняя смена", StartDate = new DateTime(2021, 07, 01), Price = 26000 }, new Voucher { Name = "Третья летняя смена", StartDate = new DateTime(2021, 08, 01), Price = 18000 }); context.SaveChanges(); } }
public AuthController(CampContext context, ILogger <AuthController> logger, IOptions <TokenSettings> optionsAccessor, IPasswordHasher <CampUser> passwordHasher, SignInManager <CampUser> signInManager, UserManager <CampUser> userManager) { this.context = context; this.logger = logger; this.passwordHasher = passwordHasher; this.signInManager = signInManager; tokenSettings = optionsAccessor.Value; this.userManager = userManager; }
public AuthController(CampContext context, SignInManager <CampUser> signInMgr, ILogger <AuthController> logger, UserManager <CampUser> userMgr, IPasswordHasher <CampUser> hasher, IConfigurationRoot config) { _context = context; _signInMgr = signInMgr; _logger = logger; _userMgr = userMgr; _hasher = hasher; _config = config; }
public AuthController(CampContext context, SignInManager <CampUser> signInMgr, ILogger <AuthController> logger, UserManager <CampUser> userMgr, IConfiguration config ) { _context = context; _signInMgr = signInMgr; _logger = logger; _userMgr = userMgr; _config = config as IConfigurationRoot; }
public RegistrationRepository(CampContext context) : base(context) { }
public CampDbInitializer(CampContext ctx) { _ctx = ctx; }
public PaymentDonationRepository(CampContext context) : base(context) { }
public CustomFieldRepository(CampContext context) : base(context) { }
public CampAccess() { _context = new CampContext(); }
public SnackShopItemRepository(CampContext context) : base(context) { }
public RedeemedCouponRepository(CampContext context) : base(context) { }
public CounselorRepository(CampContext context) : base(context) { }
public OrderController(CampContext context) { db = context; }
public SnackShopPurchaseRepository(CampContext context) : base(context) { }
public AuthController(CampContext context, SignInManager<CampUser> signInMgr, ILogger<AuthController> logger) { this.context = context; this.signInMgr = signInMgr; this.logger = logger; }
public BookingAccess() { _context = new CampContext(); }
protected override void Seed(CampContext ctx) { if (!ctx.Camps.Any()) { ctx.Camps.AddOrUpdate(x => x.CampId, new Camp() { CampId = 1, Moniker = "ATL2018", Name = "Atlanta Code Camp", EventDate = new DateTime(2018, 10, 18), Location = new Location() { VenueName = "Atlanta Convention Center", Address1 = "123 Main Street", CityTown = "Atlanta", StateProvince = "GA", PostalCode = "12345", Country = "USA" }, Length = 1, Talks = new Talk[] { new Talk { TalkId = 1, Title = "Entity Framework From Scratch", Abstract = "Entity Framework from scratch in an hour. Probably cover it all", Level = 100, Speaker = new Speaker { SpeakerId = 1, FirstName = "Shawn", LastName = "Wildermuth", BlogUrl = "http://wildermuth.com", Company = "Wilder Minds LLC", CompanyUrl = "http://wilderminds.com", GitHub = "shawnwildermuth", Twitter = "shawnwildermuth" } }, new Talk { TalkId = 2, Title = "Writing Sample Data Made Easy", Abstract = "Thinking of good sample data examples is tiring.", Level = 200, Speaker = new Speaker { SpeakerId = 2, FirstName = "Resa", LastName = "Wildermuth", BlogUrl = "http://shawnandresa.com", Company = "Wilder Minds LLC", CompanyUrl = "http://wilderminds.com", GitHub = "resawildermuth", Twitter = "resawildermuth" } } } }); } }
public CampsController(ICampRepository campRepository, IMapper mapper, CampContext campContext) { this.campRepository = campRepository; this.mapper = mapper; this.campContext = campContext; }
public CampRepository(CampContext context) { _context = context; }
public static void Initialize(CampContext context) { if (!context.Vouchers.Any()) { context.Vouchers.AddRange( new Voucher { Name = "Оздоровительная", Price = 39800, CountOfDay = 21, Description = "Размещение в одноэтажном кирпичном стационарном корпусе с удобствами на этаже: душ, санузел, умывальник, ногомойка, в комнатах на 4-5 человек. Корпус оборудован крытой верандой, оснащенной для отрядной работы телевизором, столами, стендами, пожарной сигнализацией, питьевой водой. Кроме образовательных, психологических, культурно-досуговых и услуг по организации физической культуры и спорта, детям оказывается первая медицинская помощь, организуются консультативные приемы врачами-специалистами, проводится работа по формированию здорового образа жизни.", ServiceList = "фиточай №10, кислородный коктейль №10, море, бассейн №5 (по погоде)." }, new Voucher { Name = "Санаторная", Price = 45580, CountOfDay = 24, Description = "Размещение в одноэтажном кирпичном стационарном корпусе с удобствами на этаже: душ, санузел, умывальник, ногомойка, в комнатах на 4-5 человек. Корпус оборудован крытой верандой, оснащенной для отрядной работы телевизором, столами, стендами, пожарной сигнализацией, питьевой водой. Кроме образовательных, психологических, культурно-досуговых и услуг по организации физической культуры и спорта, детям оказывается первая медицинская помощь, организуются консультативные приемы врачами-специалистами, проводится работа по формированию здорового образа жизни.", ServiceList = "лечебная физкультура №5, скандинавская ходьба №5 (по погоде), кислородный коктейль №10,море,бассейн №5 (по погоде), 1 (одна) физиопроцедура по медицинским показаниям №7, соляная комната (по медицинским показаниям)." }); context.SaveChanges(); } if (!context.Tours.Any()) { context.AddRange( new Tour { Name = "Первая летняя", StartDate = new DateTime(2021, 05, 26), CountOfPlace = 200 }, new Tour { Name = "Вторая летняя", StartDate = new DateTime(2021, 06, 20), CountOfPlace = 200 }, new Tour { Name = "Третья летняя", StartDate = new DateTime(2021, 07, 15), CountOfPlace = 200 }); context.SaveChanges(); } if (!context.Roles.Any() && !context.Users.Any()) { //string adminRoleName = "admin"; //string adminEmail = "*****@*****.**"; //string adminPassword = "******"; //User adminUser = new User { Email = adminEmail, Password = adminPassword }; //Role adminRole = new Role { Name = adminRoleName }; //adminUser.Roles.Add(adminRole); //context.Roles.Add(adminRole); //context.Users.Add(adminUser); //context.SaveChanges(); } }
public HomeController(CampContext context) { db = context; }
public CamperRepository(CampContext context) : base(context) { }
public NotificationRepository(CampContext context) : base(context) { }
public CampRepository(CampContext context, ILogger <CampRepository> logger) { _context = context; _logger = logger; }
public BaseRepository(CampContext context) { Context = context; }
public AuthClientRepository(CampContext context) : base(context) { }
public AdminController(CampContext context) { db = context; }
public CampCreateModelsController(CampContext context) { _context = context; }
public AdminController(CampContext context, ViewRender view) { this.view = view; db = context; }
public AccountController(CampContext context) { db = context; }