Пример #1
0
 public RegisterModel(
     UserManager <ApplicationUser> userManager,
     SignInManager <ApplicationUser> signInManager,
     ILogger <RegisterModel> logger,
     IEmailSender emailSender,
     FatClub.Models.FatClubContext context)
 {
     _userManager   = userManager;
     _signInManager = signInManager;
     _logger        = logger;
     _emailSender   = emailSender;
     _context       = context;
 }
Пример #2
0
        public static void Initialize(IServiceProvider serviceProvider)
        {
            using (var context = new FatClubContext(
                       serviceProvider.GetRequiredService <
                           DbContextOptions <FatClubContext> >()))
            {
                // Look for any movies.

                return;

                /*
                 * context.Food.AddRange(
                 *  new Food
                 *  {
                 *      Name = "When Harry Met Sally",
                 *      Price = 7.99M
                 *  },
                 *
                 *  new Food
                 *  {
                 *      Name = "Ghostbusters ",
                 *      Price = 8.99M
                 *  },
                 *
                 *  new Food
                 *  {
                 *      Name = "Ghostbusters 2",
                 *      Price = 9.99M
                 *  },
                 *
                 *  new Food
                 *  {
                 *      Name = "Rio Bravo",
                 *      Price = 3.99M
                 *  }
                 * );
                 *
                 * context.SaveChanges();
                 */
            }
        }
Пример #3
0
 public CheckoutModel(FatClub.Models.FatClubContext context)
 {
     _context = context;
 }
Пример #4
0
 public CreateModel(RoleManager <ApplicationRole> roleManager,
                    FatClub.Models.FatClubContext context)
 {
     _roleManager = roleManager;
     _context     = context;
 }
Пример #5
0
 public LoginWith2faModel(SignInManager <ApplicationUser> signInManager, ILogger <LoginWith2faModel> logger, FatClub.Models.FatClubContext context)
 {
     _signInManager = signInManager;
     _logger        = logger;
     _context       = context;
 }
Пример #6
0
 public IndexModel(FatClub.Models.FatClubContext context)
 {
     _context = context;
 }
Пример #7
0
 public ViewCartModel(FatClub.Models.FatClubContext context)
 {
     _context = context;
 }
Пример #8
0
 public ManageModel(FatClub.Models.FatClubContext context, UserManager <ApplicationUser> userManager, RoleManager <ApplicationRole> roleManager)
 {
     _context     = context;
     _userManager = userManager;
     _roleManager = roleManager;
 }
Пример #9
0
 public DetailsModel(FatClub.Models.FatClubContext context)
 {
     _context = context;
 }
Пример #10
0
 public ConfirmEmailModel(UserManager <ApplicationUser> userManager, FatClub.Models.FatClubContext context)
 {
     _userManager = userManager;
     _context     = context;
 }
Пример #11
0
 public AddFoodModel(FatClub.Models.FatClubContext context)
 {
     _context = context;
 }
Пример #12
0
 public EditModel(FatClub.Models.FatClubContext context)
 {
     _context = context;
 }
Пример #13
0
 public CreateModel(FatClub.Models.FatClubContext context)
 {
     _context = context;
 }
Пример #14
0
 public ResetPasswordModel(UserManager <ApplicationUser> userManager, FatClub.Models.FatClubContext context)
 {
     _userManager = userManager;
     _context     = context;
 }
Пример #15
0
 public DeleteFoodModel(FatClub.Models.FatClubContext context)
 {
     _context = context;
 }