PIbd-21 Valiulov I.A. LabWork04 #5

Closed
Ilyas wants to merge 2 commits from LabWork04 into LabWork03
3 changed files with 0 additions and 10 deletions
Showing only changes of commit 03404a1c7a - Show all commits

View File

@ -3,7 +3,6 @@ using Dapper;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using Npgsql;
using static System.Runtime.InteropServices.JavaScript.JSType;
namespace CarpentryWorkshop.Repositories.Implementations;

View File

@ -75,10 +75,6 @@ public class OrderRepository : IOrderRepository
try
{
using var connection = new NpgsqlConnection(_connectionString.ConnectionString);
//var querySelect = @"SELECT * FROM Orders";
//var order = connection.Query<Order>(querySelect);
//_logger.LogDebug("Полученные объекты: {json}", JsonConvert.SerializeObject(order));
//return order;
var querySelect = @"
SELECT orders.*, products.id AS productid, products.name AS productname, op.count AS count
FROM orders

View File

@ -3,7 +3,6 @@ using Dapper;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using Npgsql;
using static System.Runtime.InteropServices.JavaScript.JSType;
namespace CarpentryWorkshop.Repositories.Implementations;
@ -76,8 +75,6 @@ public class ProductRepository : IProductRepository
try
{
using var connection = new NpgsqlConnection(_connectionString.ConnectionString);
//var querySelect = @"SELECT * FROM Products";
//var product = connection.Query<Product>(querySelect);
var querySelect = @"
SELECT products.*, materials.id AS materialid, materials.name AS materialname, pm.count AS count
FROM products
@ -107,8 +104,6 @@ public class ProductRepository : IProductRepository
fr.SetProductMaterial(x.Value);
return fr;
}).ToArray();
//return product;
}
catch (Exception ex)
{