zinab_elgendy преди 1 седмица
родител
ревизия
12f64b441e
променени са 2 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 1 1
      MTWorkHR.API/Program.cs
  2. 1 1
      MTWorkHR.Infrastructure/InfrastructureServiceRegistration.cs

+ 1 - 1
MTWorkHR.API/Program.cs

@@ -38,7 +38,7 @@ var config = new AppSettingsConfiguration();
 // Add services to the container.
 // Add services to the container.
 builder.Services.AddDbContext<HRDataContext>(options =>
 builder.Services.AddDbContext<HRDataContext>(options =>
 {
 {
-    options.UseSqlServer(config.ConnectionStrings.mt);
+    options.UseSqlServer(config.ConnectionStrings.MTWorkHRConnectionString);
     //  options.UseSqlServer(builder.Configuration.GetSection("ConnectionStrings:MTWorkHRConnectionString").Value);
     //  options.UseSqlServer(builder.Configuration.GetSection("ConnectionStrings:MTWorkHRConnectionString").Value);
 });
 });
 
 

+ 1 - 1
MTWorkHR.Infrastructure/InfrastructureServiceRegistration.cs

@@ -32,7 +32,7 @@ namespace MTWorkHR.Infrastructure
             
             
             services.AddDbContext<HRDataContext>(options =>
             services.AddDbContext<HRDataContext>(options =>
                 options.UseSqlServer(
                 options.UseSqlServer(
-                    config.ConnectionStrings.LocalConnectionString  //configuration.GetSection("ConnectionString:MTWorkHRConnectionString").Value
+                    config.ConnectionStrings.MTWorkHRConnectionString  //configuration.GetSection("ConnectionString:MTWorkHRConnectionString").Value
                     ));
                     ));
            
            
             services.AddIdentity<ApplicationUser, ApplicationRole>().AddEntityFrameworkStores<HRDataContext>().AddDefaultTokenProviders();
             services.AddIdentity<ApplicationUser, ApplicationRole>().AddEntityFrameworkStores<HRDataContext>().AddDefaultTokenProviders();