Переименование проекта

This commit is contained in:
Pyro 2024-12-13 00:11:52 +04:00
parent 68a912864c
commit a5a1099be9
5 changed files with 8 additions and 8 deletions

View File

@ -10,12 +10,12 @@ public class Product
public double Price { get; private set; }
public IEnumerable<ProductComponent> ProductComponents { get; private set; } = [];
public static Product CreateEntity(int id, ConfectioneryType сonfectionaryType, string name, double price, IEnumerable<ProductComponent> productComponents)
public static Product CreateEntity(int id, ConfectioneryType сonfectioneryType, string name, double price, IEnumerable<ProductComponent> productComponents)
{
return new Product
{
Id = id,
ConfectioneryType = сonfectionaryType,
ConfectioneryType = сonfectioneryType,
Name = name ?? string.Empty,
Price = price,
ProductComponents = productComponents

View File

@ -1,4 +1,4 @@
namespace ProjectConfectionaryFactory.Repositories;
namespace ProjectConfectioneryFactory.Repositories;
public interface IConnectionString
{

View File

@ -1,4 +1,4 @@
namespace ProjectConfectionaryFactory.Repositories.Implementations;
namespace ProjectConfectioneryFactory.Repositories.Implementations;
internal class ConnectionString : IConnectionString
{

View File

@ -30,8 +30,8 @@ public class ProductRepository : IProductRepository
connection.Open();
using var transaction = connection.BeginTransaction();
var queryInsert = @"
INSERT INTO Products (ConfectionaryType, Name, Price)
VALUES (@ConfectionaryType, @Name, @Price);
INSERT INTO Products (ConfectioneryType, Name, Price)
VALUES (@ConfectioneryType, @Name, @Price);
SELECT MAX(Id)
FROM Products;";
var productId = connection.QueryFirst<int>(queryInsert, product, transaction);
@ -64,7 +64,7 @@ public class ProductRepository : IProductRepository
var queryUpdate = @"
UPDATE Products
SET
сonfectionaryType=@сonfectionaryType,
сonfectioneryType=@сonfectioneryType,
Name=@Name,
Price=@Price
WHERE Id=@Id";

View File

@ -6,7 +6,7 @@
{
"Name": "File",
"Args": {
"path": "Logs/confectionary_log.txt",
"path": "Logs/confectionery_log.txt",
"rollingInterval": "Day"
}
}