Exemplo n.º 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;
 }
Exemplo n.º 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();
                 */
            }
        }
Exemplo n.º 3
0
 public CheckoutModel(FatClub.Models.FatClubContext context)
 {
     _context = context;
 }
Exemplo n.º 4
0
 public CreateModel(RoleManager <ApplicationRole> roleManager,
                    FatClub.Models.FatClubContext context)
 {
     _roleManager = roleManager;
     _context     = context;
 }
Exemplo n.º 5
0
 public LoginWith2faModel(SignInManager <ApplicationUser> signInManager, ILogger <LoginWith2faModel> logger, FatClub.Models.FatClubContext context)
 {
     _signInManager = signInManager;
     _logger        = logger;
     _context       = context;
 }
Exemplo n.º 6
0
 public IndexModel(FatClub.Models.FatClubContext context)
 {
     _context = context;
 }
Exemplo n.º 7
0
 public ViewCartModel(FatClub.Models.FatClubContext context)
 {
     _context = context;
 }
Exemplo n.º 8
0
 public ManageModel(FatClub.Models.FatClubContext context, UserManager <ApplicationUser> userManager, RoleManager <ApplicationRole> roleManager)
 {
     _context     = context;
     _userManager = userManager;
     _roleManager = roleManager;
 }
Exemplo n.º 9
0
 public DetailsModel(FatClub.Models.FatClubContext context)
 {
     _context = context;
 }
Exemplo n.º 10
0
 public ConfirmEmailModel(UserManager <ApplicationUser> userManager, FatClub.Models.FatClubContext context)
 {
     _userManager = userManager;
     _context     = context;
 }
Exemplo n.º 11
0
 public AddFoodModel(FatClub.Models.FatClubContext context)
 {
     _context = context;
 }
Exemplo n.º 12
0
 public EditModel(FatClub.Models.FatClubContext context)
 {
     _context = context;
 }
Exemplo n.º 13
0
 public CreateModel(FatClub.Models.FatClubContext context)
 {
     _context = context;
 }
Exemplo n.º 14
0
 public ResetPasswordModel(UserManager <ApplicationUser> userManager, FatClub.Models.FatClubContext context)
 {
     _userManager = userManager;
     _context     = context;
 }
Exemplo n.º 15
0
 public DeleteFoodModel(FatClub.Models.FatClubContext context)
 {
     _context = context;
 }