public CommunicationController(OSnackDbContext db, IWebHostEnvironment webEnv) { _DbContext = db; _WebHost = webEnv; _LoggingService = new LoggingService(db); _EmailService = new EmailService(AppConst.Settings.EmailSettings, _LoggingService, webEnv, _DbContext); }
public OrderController( IWebHostEnvironment webEnv, OSnackDbContext db) { _DbContext = db; _LoggingService = new LoggingService(db); _EmailService = new EmailService(AppConst.Settings.EmailSettings, _LoggingService, webEnv, _DbContext); }
/// <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(); }
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; }
public MaintenanceController(OSnackDbContext db , OSnackSignInManager <User> sm , IAuthorizationService authService) { _DbContext = db; _SignInManager = sm; _AuthService = authService; _LoggingService = new LoggingService(db); }
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); }
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); }
public EmailController(OSnackDbContext db, IWebHostEnvironment webEnv) { _DbContext = db; WebHost = webEnv; _LoggingService = new LoggingService(db); }
public LoggingService(OSnackDbContext dbContext) =>
public AddressController(OSnackDbContext db) { _DbContext = db; _LoggingService = new LoggingService(db); }
public CouponController(OSnackDbContext db) { _DbContext = db; _LoggingService = new LoggingService(db); }
public DeliveryOptionController(OSnackDbContext db) { _DbContext = db; _LoggingService = new LoggingService(db); }
public NewsletterController(OSnackDbContext db) { _DbContext = db; _LoggingService = new LoggingService(db); }