Exemplo n.º 1
0
 public CommunicationController(OSnackDbContext db, IWebHostEnvironment webEnv)
 {
     _DbContext      = db;
     _WebHost        = webEnv;
     _LoggingService = new LoggingService(db);
     _EmailService   = new EmailService(AppConst.Settings.EmailSettings, _LoggingService, webEnv, _DbContext);
 }
Exemplo n.º 2
0
 public OrderController(
     IWebHostEnvironment webEnv, OSnackDbContext db)
 {
     _DbContext      = db;
     _LoggingService = new LoggingService(db);
     _EmailService   = new EmailService(AppConst.Settings.EmailSettings, _LoggingService, webEnv, _DbContext);
 }
Exemplo n.º 3
0
Arquivo: Token.cs Projeto: p8b/OSnack
        /// <summary>
        ///     Used to generate a URL to verify the user's request such as
        ///     password reset and user's email validation.
        /// </summary>
        /// <param name="user">Register the token with a specific user</param>
        /// <param name="ExpiaryDate">The expiry of the token</param>
        /// <param name="dbContext">DbContext to remove old tokens and save the new one</param>
        /// <param name="UrlPath">The path of the url e.g. "/reset/Password"</param>
        /// <param name="UrlDomain">The domain of the url e.g. "https://*****:*****@"{0}{1}/{2}", UrlDomain, UrlPath, Value);

            dbContext.Entry(User).State = Microsoft.EntityFrameworkCore.EntityState.Unchanged;
            dbContext.Tokens.Add(this);
            dbContext.SaveChanges();
        }
Exemplo n.º 4
0
 public EmailService(EmailSettings emailSettings, LoggingService loggingService, IWebHostEnvironment webEnv, OSnackDbContext dbContext)
 {
     /// Set the class attributes with the objects received from their
     /// corresponding middle-ware
     _EmailSettings  = emailSettings;
     _DbContext      = dbContext;
     _WebEnv         = webEnv;
     _LoggingService = loggingService;
 }
Exemplo n.º 5
0
 public MaintenanceController(OSnackDbContext db
                              , OSnackSignInManager <User> sm
                              , IAuthorizationService authService)
 {
     _DbContext      = db;
     _SignInManager  = sm;
     _AuthService    = authService;
     _LoggingService = new LoggingService(db);
 }
Exemplo n.º 6
0
 public UserController(OSnackDbContext db,
                       UserManager <User> um,
                       IWebHostEnvironment webEnv,
                       SignInManager <User> sm)
 {
     _DbContext      = db;
     _UserManager    = um;
     _SignInManager  = sm;
     _LoggingService = new LoggingService(db);
     _EmailService   = new EmailService(AppConst.Settings.EmailSettings, _LoggingService, webEnv, _DbContext);
 }
Exemplo n.º 7
0
 public AuthenticationController(OSnackDbContext db
                                 , OSnackSignInManager <User> sm
                                 , UserManager <User> um
                                 , IAntiforgery af
                                 , IWebHostEnvironment env
                                 , IAuthorizationService authService
                                 )
 {
     _DbContext      = db;
     _SignInManager  = sm;
     _UserManager    = um;
     _Antiforgery    = af;
     _WebHostingEnv  = env;
     _AuthService    = authService;
     _LoggingService = new LoggingService(db);
 }
Exemplo n.º 8
0
 public EmailController(OSnackDbContext db, IWebHostEnvironment webEnv)
 {
     _DbContext      = db;
     WebHost         = webEnv;
     _LoggingService = new LoggingService(db);
 }
Exemplo n.º 9
0
 public LoggingService(OSnackDbContext dbContext) =>
Exemplo n.º 10
0
 public AddressController(OSnackDbContext db)
 {
     _DbContext      = db;
     _LoggingService = new LoggingService(db);
 }
Exemplo n.º 11
0
 public CouponController(OSnackDbContext db)
 {
     _DbContext      = db;
     _LoggingService = new LoggingService(db);
 }
Exemplo n.º 12
0
 public DeliveryOptionController(OSnackDbContext db)
 {
     _DbContext      = db;
     _LoggingService = new LoggingService(db);
 }
Exemplo n.º 13
0
 public NewsletterController(OSnackDbContext db)
 {
     _DbContext      = db;
     _LoggingService = new LoggingService(db);
 }