Exemple #1
0
        public AdminService(IConfiguration configuration)
        {
            var optionsBuilder = new DbContextOptionsBuilder <AdminContext>();

            optionsBuilder.UseSqlServer(configuration.GetConnectionString("DefaultConnection"));
            this.context = new AdminContext(optionsBuilder.Options);
        }
Exemple #2
0
        public static void AddAdminRequestLogs(AdminRequestLog log)
        {
            var Context = new AdminContext();

            Context.AdminRequestLog.Add(log);
            Context.SaveChanges();
        }
        public static bool CheckCompanyExist(int companyId)
        {
            var Context = new AdminContext();

            return(Context.InsuranceCompanies.Any(x => x.InsuranceCompanyID == companyId));
        }