Example #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);
 }
Example #2
0
 public OrderController(
     IWebHostEnvironment webEnv, OSnackDbContext db)
 {
     _DbContext      = db;
     _LoggingService = new LoggingService(db);
     _EmailService   = new EmailService(AppConst.Settings.EmailSettings, _LoggingService, webEnv, _DbContext);
 }
Example #3
0
File: Token.cs Project: 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();
        }
Example #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;
 }
Example #5
0
 public MaintenanceController(OSnackDbContext db
                              , OSnackSignInManager <User> sm
                              , IAuthorizationService authService)
 {
     _DbContext      = db;
     _SignInManager  = sm;
     _AuthService    = authService;
     _LoggingService = new LoggingService(db);
 }
Example #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);
 }
Example #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);
 }
Example #8
0
 public EmailController(OSnackDbContext db, IWebHostEnvironment webEnv)
 {
     _DbContext      = db;
     WebHost         = webEnv;
     _LoggingService = new LoggingService(db);
 }
Example #9
0
 public LoggingService(OSnackDbContext dbContext) =>
Example #10
0
 public AddressController(OSnackDbContext db)
 {
     _DbContext      = db;
     _LoggingService = new LoggingService(db);
 }
Example #11
0
 public CouponController(OSnackDbContext db)
 {
     _DbContext      = db;
     _LoggingService = new LoggingService(db);
 }
Example #12
0
 public DeliveryOptionController(OSnackDbContext db)
 {
     _DbContext      = db;
     _LoggingService = new LoggingService(db);
 }
Example #13
0
 public NewsletterController(OSnackDbContext db)
 {
     _DbContext      = db;
     _LoggingService = new LoggingService(db);
 }