diff --git a/Exam.StockManagement.API/Data/CategorySeedData.cs b/Exam.StockManagement.API/Data/CategorySeedData.cs index 2bb4dc4..9eb9d16 100644 --- a/Exam.StockManagement.API/Data/CategorySeedData.cs +++ b/Exam.StockManagement.API/Data/CategorySeedData.cs @@ -10,7 +10,7 @@ public static async Task InitiliazeDataAsync(this IServiceProvider serviceProvid var db = serviceProvider.GetRequiredService(); if (!db.Categories.Any()) { - List transports = [ + List Categories = [ new Category { CategoryName = "Kompyuter" @@ -28,7 +28,7 @@ public static async Task InitiliazeDataAsync(this IServiceProvider serviceProvid CategoryName = "Quloqchin" } ]; - db.Categories.AddRange(transports); + db.Categories.AddRange(Categories); await db.SaveChangesAsync(); } } diff --git a/Exam.StockManagement.API/Data/ProductSeedData.cs b/Exam.StockManagement.API/Data/ProductSeedData.cs index 56b79ef..3afff25 100644 --- a/Exam.StockManagement.API/Data/ProductSeedData.cs +++ b/Exam.StockManagement.API/Data/ProductSeedData.cs @@ -10,7 +10,7 @@ public static async Task InitiliazeDataAsync(this IServiceProvider serviceProvid var db = serviceProvider.GetRequiredService(); if (!db.Products.Any()) { - List transports = [ + List Products = [ new Product { CategoryId = 1, @@ -93,7 +93,7 @@ public static async Task InitiliazeDataAsync(this IServiceProvider serviceProvid CreatedAt = DateTime.UtcNow, }, ]; - db.Products.AddRange(transports); + db.Products.AddRange(Products); await db.SaveChangesAsync(); } } diff --git a/Exam.StockManagement.API/appsettings.json b/Exam.StockManagement.API/appsettings.json index 10ddd98..2355d24 100644 --- a/Exam.StockManagement.API/appsettings.json +++ b/Exam.StockManagement.API/appsettings.json @@ -7,7 +7,7 @@ }, "AllowedHosts": "*", "ConnectionStrings": { - "StockManagementConnectionString": "Host=localhost;Port=5432;Username=postgres;Password=coder;Database=StockManagementDB;" + "StockManagementConnectionString": "Host=localhost;Port=5432;Username=postgres;Password=coder;Database=TesDBProduct;" }, "JWT": { "ValidAudience": "StockManagement",