Explorar el Código

fix ConnectionString

zinab_elgendy hace 1 mes
padre
commit
12f64b441e

+ 1 - 1
MTWorkHR.API/Program.cs

@@ -38,7 +38,7 @@ var config = new AppSettingsConfiguration();
 // Add services to the container.
 builder.Services.AddDbContext<HRDataContext>(options =>
 {
-    options.UseSqlServer(config.ConnectionStrings.mt);
+    options.UseSqlServer(config.ConnectionStrings.MTWorkHRConnectionString);
     //  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 =>
                 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();