Пример #1
0
        public static void GetAppConfiguration(string emailId, ApplicationConfigurationContext context)
        {
            var appConfig = context.AppConfiguration.Where(a => a.UserEmailID == emailId && a.AppStatus == "Active").First();

            if (appConfig != null)
            {
                appConfig.AppStatus            = "Inactive";
                context.Entry(appConfig).State = EntityState.Modified;
                context.SaveChanges();
            }
        }
Пример #2
0
 public HomeController(ILogger <HomeController> logger, IConfiguration config, ApplicationConfigurationContext context)
 {
     _logger        = logger;
     _context       = context;
     weatherAppID   = config["Weather"];
     payslipAppID   = config["Payslips"];
     formsAppID     = config["Forms"];
     careerAppID    = config["Career"];
     discountsAppID = config["Discounts"];
     kudosAppID     = config["Kudos"];
     benefitsAppID  = config["Benefits"];
 }