From a750157cb8c587aea9aee8b755707b386147ceb8 Mon Sep 17 00:00:00 2001 From: revengel66 Date: Thu, 25 Jul 2024 18:44:30 +0400 Subject: [PATCH] end CosmeticStorage --- BeautySalon/BeautySalon.sln | 8 ++--- .../StorageContracts/IClientStorage.cs | 2 +- .../StorageContracts/ICosmeticStorage.cs | 2 +- .../StorageContracts/IDistributionStorage.cs | 2 +- .../StorageContracts/IEmployeeStorage.cs | 2 +- .../StorageContracts/IProcedureStorage.cs | 2 +- .../StorageContracts/IPurchaseStorage.cs | 2 +- .../StorageContracts/IReceiptStorage.cs | 2 +- .../StorageContracts/IVisitStorage.cs | 2 +- .../Implements/ClientStorage.cs | 2 +- .../Implements/CosmeticStorage.cs | 29 +++++++++++++++---- .../Implements/DistributionStorage.cs | 2 +- .../Implements/EmployeeStorage.cs | 2 +- .../Implements/ProcedureStorage.cs | 2 +- .../Implements/PurchaseStorage.cs | 2 +- .../Implements/ReceiptStorage.cs | 2 +- .../Implements/VisitStorage.cs | 2 +- .../Models/Client.cs | 14 ++++----- .../Models/Cosmetic.cs | 8 ++--- .../Models/Distribution.cs | 8 ++--- .../Models/Employee.cs | 14 ++++----- .../Models/Procedure.cs | 10 +++---- .../Models/Purchase.cs | 8 ++--- .../Models/Receipt.cs | 8 ++--- .../Models/Visit.cs | 8 ++--- 25 files changed, 81 insertions(+), 64 deletions(-) diff --git a/BeautySalon/BeautySalon.sln b/BeautySalon/BeautySalon.sln index 0219ef6..5d867fc 100644 --- a/BeautySalon/BeautySalon.sln +++ b/BeautySalon/BeautySalon.sln @@ -3,13 +3,13 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.9.34723.18 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BeautySalonView", "BeautySalonView\BeautySalonView.csproj", "{3DA370D1-A702-425A-A7DE-D558514373A6}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BeautySalonView", "BeautySalonView\BeautySalonView.csproj", "{3DA370D1-A702-425A-A7DE-D558514373A6}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BeautySalonContracts", "BeautySalonContracts\BeautySalonContracts.csproj", "{96010EED-D9BD-4238-941F-1D93459E5A63}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BeautySalonContracts", "BeautySalonContracts\BeautySalonContracts.csproj", "{96010EED-D9BD-4238-941F-1D93459E5A63}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BeautySalonBusinessLogic", "BeautySalonBusinessLogic\BeautySalonBusinessLogic.csproj", "{8E38BF54-E62B-43B6-970A-57D949CBF5A9}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BeautySalonBusinessLogic", "BeautySalonBusinessLogic\BeautySalonBusinessLogic.csproj", "{8E38BF54-E62B-43B6-970A-57D949CBF5A9}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BeautySalonDatabaseImplement", "BeautySalonDatabaseImplement\BeautySalonDatabaseImplement.csproj", "{96FDD17C-1CDF-42F1-9A16-D6A90285F5DA}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BeautySalonListImplement", "BeautySalonDatabaseImplement\BeautySalonListImplement.csproj", "{96FDD17C-1CDF-42F1-9A16-D6A90285F5DA}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/BeautySalon/BeautySalonContracts/StorageContracts/IClientStorage.cs b/BeautySalon/BeautySalonContracts/StorageContracts/IClientStorage.cs index ac8083b..3a3c427 100644 --- a/BeautySalon/BeautySalonContracts/StorageContracts/IClientStorage.cs +++ b/BeautySalon/BeautySalonContracts/StorageContracts/IClientStorage.cs @@ -11,6 +11,6 @@ namespace BeautySalonContracts.StorageContracts ClientViewModel GetElement(ClientSearchModel model); ClientViewModel Insert(ClientBindingModel model); ClientViewModel Update(ClientBindingModel model); - ClientViewModel Deleted(ClientBindingModel model); + ClientViewModel Delete(ClientBindingModel model); } } diff --git a/BeautySalon/BeautySalonContracts/StorageContracts/ICosmeticStorage.cs b/BeautySalon/BeautySalonContracts/StorageContracts/ICosmeticStorage.cs index 3f3a45e..3a6cadd 100644 --- a/BeautySalon/BeautySalonContracts/StorageContracts/ICosmeticStorage.cs +++ b/BeautySalon/BeautySalonContracts/StorageContracts/ICosmeticStorage.cs @@ -13,7 +13,7 @@ namespace BeautySalonContracts.StorageContracts CosmeticViewModel? GetElement(CosmeticSearchModel model); CosmeticViewModel? Insert(CosmeticBindingModel model); CosmeticViewModel? Update(CosmeticBindingModel model); - CosmeticViewModel? Deleted(CosmeticBindingModel model); + CosmeticViewModel? Delete(CosmeticBindingModel model); } } diff --git a/BeautySalon/BeautySalonContracts/StorageContracts/IDistributionStorage.cs b/BeautySalon/BeautySalonContracts/StorageContracts/IDistributionStorage.cs index e02772a..6825599 100644 --- a/BeautySalon/BeautySalonContracts/StorageContracts/IDistributionStorage.cs +++ b/BeautySalon/BeautySalonContracts/StorageContracts/IDistributionStorage.cs @@ -12,6 +12,6 @@ namespace BeautySalonContracts.StorageContracts DistributionViewModel GetElement(DistributionSearchModel model); DistributionViewModel Insert(DistributionBindingModel model); DistributionViewModel Update(DistributionBindingModel model); - DistributionViewModel Deleted(DistributionBindingModel model); + DistributionViewModel Delete(DistributionBindingModel model); } } diff --git a/BeautySalon/BeautySalonContracts/StorageContracts/IEmployeeStorage.cs b/BeautySalon/BeautySalonContracts/StorageContracts/IEmployeeStorage.cs index ed1f69a..f0b4a3d 100644 --- a/BeautySalon/BeautySalonContracts/StorageContracts/IEmployeeStorage.cs +++ b/BeautySalon/BeautySalonContracts/StorageContracts/IEmployeeStorage.cs @@ -11,6 +11,6 @@ namespace BeautySalonContracts.StorageContracts EmployeeViewModel GetElement(EmployeeSearchModel model); EmployeeViewModel Insert(EmployeeBindingModel model); EmployeeViewModel Update(EmployeeBindingModel model); - EmployeeViewModel Deleted(EmployeeBindingModel model); + EmployeeViewModel Delete(EmployeeBindingModel model); } } diff --git a/BeautySalon/BeautySalonContracts/StorageContracts/IProcedureStorage.cs b/BeautySalon/BeautySalonContracts/StorageContracts/IProcedureStorage.cs index 732a8e8..fe16dfb 100644 --- a/BeautySalon/BeautySalonContracts/StorageContracts/IProcedureStorage.cs +++ b/BeautySalon/BeautySalonContracts/StorageContracts/IProcedureStorage.cs @@ -10,6 +10,6 @@ namespace BeautySalonContracts.StorageContracts ProcedureViewModel GetElement(ProcedureSearchModel model); ProcedureViewModel Insert(ProcedureBindingModel model); ProcedureViewModel Update(ProcedureBindingModel model); - ProcedureViewModel Deleted(ProcedureBindingModel model); + ProcedureViewModel Delete(ProcedureBindingModel model); } } diff --git a/BeautySalon/BeautySalonContracts/StorageContracts/IPurchaseStorage.cs b/BeautySalon/BeautySalonContracts/StorageContracts/IPurchaseStorage.cs index 155ad33..54a0ab7 100644 --- a/BeautySalon/BeautySalonContracts/StorageContracts/IPurchaseStorage.cs +++ b/BeautySalon/BeautySalonContracts/StorageContracts/IPurchaseStorage.cs @@ -12,6 +12,6 @@ namespace BeautySalonContracts.StorageContracts PurchaseViewModel GetElement(PurchaseSearchModel model); PurchaseViewModel Insert(PurchaseBindingModel model); PurchaseViewModel Update(PurchaseBindingModel model); - PurchaseViewModel Deleted(PurchaseBindingModel model); + PurchaseViewModel Delete(PurchaseBindingModel model); } } diff --git a/BeautySalon/BeautySalonContracts/StorageContracts/IReceiptStorage.cs b/BeautySalon/BeautySalonContracts/StorageContracts/IReceiptStorage.cs index 5e9e421..df9be4c 100644 --- a/BeautySalon/BeautySalonContracts/StorageContracts/IReceiptStorage.cs +++ b/BeautySalon/BeautySalonContracts/StorageContracts/IReceiptStorage.cs @@ -11,6 +11,6 @@ namespace BeautySalonContracts.StorageContracts ReceiptViewModel GetElement(ReceiptSearchModel model); ReceiptViewModel Insert(ReceiptBindingModel model); ReceiptViewModel Update(ReceiptBindingModel model); - ReceiptViewModel Deleted(ReceiptBindingModel model); + ReceiptViewModel Delete(ReceiptBindingModel model); } } diff --git a/BeautySalon/BeautySalonContracts/StorageContracts/IVisitStorage.cs b/BeautySalon/BeautySalonContracts/StorageContracts/IVisitStorage.cs index d27bd8e..8c08f5e 100644 --- a/BeautySalon/BeautySalonContracts/StorageContracts/IVisitStorage.cs +++ b/BeautySalon/BeautySalonContracts/StorageContracts/IVisitStorage.cs @@ -11,6 +11,6 @@ namespace BeautySalonContracts.StorageContracts VisitViewModel GetElement(VisitSearchModel model); VisitViewModel Insert(VisitBindingModel model); VisitViewModel Update(VisitBindingModel model); - VisitViewModel Deleted(VisitBindingModel model); + VisitViewModel Delete(VisitBindingModel model); } } diff --git a/BeautySalon/BeautySalonDatabaseImplement/Implements/ClientStorage.cs b/BeautySalon/BeautySalonDatabaseImplement/Implements/ClientStorage.cs index 77fb629..0d8c880 100644 --- a/BeautySalon/BeautySalonDatabaseImplement/Implements/ClientStorage.cs +++ b/BeautySalon/BeautySalonDatabaseImplement/Implements/ClientStorage.cs @@ -8,7 +8,7 @@ namespace BeautySalonDatabaseImplement.Implements { internal class ClientStorage : IClientStorage { - public ClientViewModel Deleted(ClientBindingModel model) + public ClientViewModel Delete(ClientBindingModel model) { throw new NotImplementedException(); } diff --git a/BeautySalon/BeautySalonDatabaseImplement/Implements/CosmeticStorage.cs b/BeautySalon/BeautySalonDatabaseImplement/Implements/CosmeticStorage.cs index 1e773b7..8680fed 100644 --- a/BeautySalon/BeautySalonDatabaseImplement/Implements/CosmeticStorage.cs +++ b/BeautySalon/BeautySalonDatabaseImplement/Implements/CosmeticStorage.cs @@ -45,13 +45,13 @@ namespace BeautySalonDatabaseImplement.Implements } public CosmeticViewModel? GetElement(CosmeticSearchModel model) { - if (string.IsNullOrEmpty(model.Name)) + if (string.IsNullOrEmpty(model.Name) && !model.Id.HasValue) { return null; } foreach(var cosmetic in _source.Cosmetics) { - if ((!string.IsNullOrEmpty(model.Name) && cosmetic.Name == model.Name) || (cosmetic.Id == model.Id)) + if ((!string.IsNullOrEmpty(model.Name) && cosmetic.Name == model.Name) || (cosmetic.Id == model.Id && model.Id.HasValue)) { return cosmetic.GetViewModel; } @@ -76,17 +76,34 @@ namespace BeautySalonDatabaseImplement.Implements } _source.Cosmetics.Add(newCosmetic); - return newComponent.GetViewModel; + return newCosmetic.GetViewModel; } public CosmeticViewModel? Update(CosmeticBindingModel model) { - throw new NotImplementedException(); + foreach (var cosmetic in _source.Cosmetics) + { + if (cosmetic.Id == model.Id) + { + cosmetic.Update(model); + return cosmetic.GetViewModel; + } + } + return null; } - public CosmeticViewModel? Deleted(CosmeticBindingModel model) + public CosmeticViewModel? Delete(CosmeticBindingModel model) { - throw new NotImplementedException(); + for (int i = 0; i < _source.Cosmetics.Count; ++i) + { + if (_source.Cosmetics[i].Id == model.Id) + { + var deleted = _source.Cosmetics[i]; + _source.Cosmetics.RemoveAt(i); + return deleted.GetViewModel; + } + } + return null; } } diff --git a/BeautySalon/BeautySalonDatabaseImplement/Implements/DistributionStorage.cs b/BeautySalon/BeautySalonDatabaseImplement/Implements/DistributionStorage.cs index df05a92..a14c5c5 100644 --- a/BeautySalon/BeautySalonDatabaseImplement/Implements/DistributionStorage.cs +++ b/BeautySalon/BeautySalonDatabaseImplement/Implements/DistributionStorage.cs @@ -7,7 +7,7 @@ namespace BeautySalonDatabaseImplement.Implements { internal class DistributionStorage : IDistributionStorage { - public DistributionViewModel Deleted(DistributionBindingModel model) + public DistributionViewModel Delete(DistributionBindingModel model) { throw new NotImplementedException(); } diff --git a/BeautySalon/BeautySalonDatabaseImplement/Implements/EmployeeStorage.cs b/BeautySalon/BeautySalonDatabaseImplement/Implements/EmployeeStorage.cs index 89ff62a..8652754 100644 --- a/BeautySalon/BeautySalonDatabaseImplement/Implements/EmployeeStorage.cs +++ b/BeautySalon/BeautySalonDatabaseImplement/Implements/EmployeeStorage.cs @@ -7,7 +7,7 @@ namespace BeautySalonDatabaseImplement.Implements { internal class EmployeeStorage : IEmployeeStorage { - public EmployeeViewModel Deleted(EmployeeBindingModel model) + public EmployeeViewModel Delete(EmployeeBindingModel model) { throw new NotImplementedException(); } diff --git a/BeautySalon/BeautySalonDatabaseImplement/Implements/ProcedureStorage.cs b/BeautySalon/BeautySalonDatabaseImplement/Implements/ProcedureStorage.cs index 5fbdd69..e4df0e8 100644 --- a/BeautySalon/BeautySalonDatabaseImplement/Implements/ProcedureStorage.cs +++ b/BeautySalon/BeautySalonDatabaseImplement/Implements/ProcedureStorage.cs @@ -7,7 +7,7 @@ namespace BeautySalonDatabaseImplement.Implements { internal class ProcedureStorage : IProcedureStorage { - public ProcedureViewModel Deleted(ProcedureBindingModel model) + public ProcedureViewModel Delete(ProcedureBindingModel model) { throw new NotImplementedException(); } diff --git a/BeautySalon/BeautySalonDatabaseImplement/Implements/PurchaseStorage.cs b/BeautySalon/BeautySalonDatabaseImplement/Implements/PurchaseStorage.cs index aafe14d..d25e374 100644 --- a/BeautySalon/BeautySalonDatabaseImplement/Implements/PurchaseStorage.cs +++ b/BeautySalon/BeautySalonDatabaseImplement/Implements/PurchaseStorage.cs @@ -7,7 +7,7 @@ namespace BeautySalonDatabaseImplement.Implements { internal class PurchaseStorage : IPurchaseStorage { - public PurchaseViewModel Deleted(PurchaseBindingModel model) + public PurchaseViewModel Delete(PurchaseBindingModel model) { throw new NotImplementedException(); } diff --git a/BeautySalon/BeautySalonDatabaseImplement/Implements/ReceiptStorage.cs b/BeautySalon/BeautySalonDatabaseImplement/Implements/ReceiptStorage.cs index a837f69..a057754 100644 --- a/BeautySalon/BeautySalonDatabaseImplement/Implements/ReceiptStorage.cs +++ b/BeautySalon/BeautySalonDatabaseImplement/Implements/ReceiptStorage.cs @@ -7,7 +7,7 @@ namespace BeautySalonDatabaseImplement.Implements { internal class ReceiptStorage : IReceiptStorage { - public ReceiptViewModel Deleted(ReceiptBindingModel model) + public ReceiptViewModel Delete(ReceiptBindingModel model) { throw new NotImplementedException(); } diff --git a/BeautySalon/BeautySalonDatabaseImplement/Implements/VisitStorage.cs b/BeautySalon/BeautySalonDatabaseImplement/Implements/VisitStorage.cs index c16a0d3..803ba33 100644 --- a/BeautySalon/BeautySalonDatabaseImplement/Implements/VisitStorage.cs +++ b/BeautySalon/BeautySalonDatabaseImplement/Implements/VisitStorage.cs @@ -8,7 +8,7 @@ namespace BeautySalonDatabaseImplement.Implements { internal class VisitStorage : IVisitStorage { - public VisitViewModel Deleted(VisitBindingModel model) + public VisitViewModel Delete(VisitBindingModel model) { throw new NotImplementedException(); } diff --git a/BeautySalon/BeautySalonDatabaseImplement/Models/Client.cs b/BeautySalon/BeautySalonDatabaseImplement/Models/Client.cs index b39eb09..d171fe7 100644 --- a/BeautySalon/BeautySalonDatabaseImplement/Models/Client.cs +++ b/BeautySalon/BeautySalonDatabaseImplement/Models/Client.cs @@ -5,14 +5,14 @@ using System.Diagnostics; namespace BeautySalonDatabaseImplement.Models { - public class Client + internal class Client { - public int Id { get; set; } - public string Name { get; set; } = string.Empty; - public string Surname { get; set; } = string.Empty; - public string Login { get; set; } = string.Empty; - public string Password { get; set; } = string.Empty; - public string Phone { get; set; } = string.Empty; + public int Id { get; private set; } + public string Name { get; private set; } = string.Empty; + public string Surname { get; private set; } = string.Empty; + public string Login { get; private set; } = string.Empty; + public string Password { get; private set; } = string.Empty; + public string Phone { get; private set; } = string.Empty; public static Client? Create(ClientBindingModel model) { diff --git a/BeautySalon/BeautySalonDatabaseImplement/Models/Cosmetic.cs b/BeautySalon/BeautySalonDatabaseImplement/Models/Cosmetic.cs index 16c04bb..d3eb1ef 100644 --- a/BeautySalon/BeautySalonDatabaseImplement/Models/Cosmetic.cs +++ b/BeautySalon/BeautySalonDatabaseImplement/Models/Cosmetic.cs @@ -4,11 +4,11 @@ using BeautySalonContracts.ViewModels; namespace BeautySalonDatabaseImplement.Models { - public class Cosmetic + internal class Cosmetic { - public int Id { get; set; } - public string Name { get; set; } = string.Empty; - public double Price { get; set; } + public int Id { get; private set; } + public string Name { get; private set; } = string.Empty; + public double Price { get; private set; } public static Cosmetic? Create(CosmeticBindingModel model) { diff --git a/BeautySalon/BeautySalonDatabaseImplement/Models/Distribution.cs b/BeautySalon/BeautySalonDatabaseImplement/Models/Distribution.cs index 4ec3647..254bab2 100644 --- a/BeautySalon/BeautySalonDatabaseImplement/Models/Distribution.cs +++ b/BeautySalon/BeautySalonDatabaseImplement/Models/Distribution.cs @@ -7,11 +7,11 @@ using System.Xml.Linq; namespace BeautySalonDatabaseImplement.Models { - public class Distribution + internal class Distribution { - public int Id { get; set; } - public DateTime Date { get; set; } - public double Sum { get; set; } + public int Id { get; private set; } + public DateTime Date { get; private set; } + public double Sum { get; private set; } public static Distribution? Create(DistributionBindingModel model) { if (model == null) diff --git a/BeautySalon/BeautySalonDatabaseImplement/Models/Employee.cs b/BeautySalon/BeautySalonDatabaseImplement/Models/Employee.cs index e3905b2..e7d490e 100644 --- a/BeautySalon/BeautySalonDatabaseImplement/Models/Employee.cs +++ b/BeautySalon/BeautySalonDatabaseImplement/Models/Employee.cs @@ -4,14 +4,14 @@ using BeautySalonContracts.ViewModels; namespace BeautySalonDatabaseImplement.Models { - public class Employee + internal class Employee { - public int Id { get; set; } - public string Name { get; set; } = string.Empty; - public string Surname { get; set; } = string.Empty; - public string Login { get; set; } = string.Empty; - public string Password { get; set; } = string.Empty; - public string Phone { get; set; } = string.Empty; + public int Id { get; private set; } + public string Name { get; private set; } = string.Empty; + public string Surname { get; private set; } = string.Empty; + public string Login { get; private set; } = string.Empty; + public string Password { get; private set; } = string.Empty; + public string Phone { get; private set; } = string.Empty; public static Employee? Create(EmployeeBindingModel model) { if (model == null) diff --git a/BeautySalon/BeautySalonDatabaseImplement/Models/Procedure.cs b/BeautySalon/BeautySalonDatabaseImplement/Models/Procedure.cs index 1e62e16..2f1c7e9 100644 --- a/BeautySalon/BeautySalonDatabaseImplement/Models/Procedure.cs +++ b/BeautySalon/BeautySalonDatabaseImplement/Models/Procedure.cs @@ -5,12 +5,12 @@ using System.Reflection; namespace BeautySalonDatabaseImplement.Models { - public class Procedure + internal class Procedure { - public int Id { get; set; } - public string Name { get; set; } = string.Empty; - public double Price { get; set; } - public string FIO_Master { get; set; } = string.Empty; + public int Id { get; private set; } + public string Name { get; private set; } = string.Empty; + public double Price { get; private set; } + public string FIO_Master { get; private set; } = string.Empty; public static Procedure? Create(ProcedureBindingModel model) { if (model == null) diff --git a/BeautySalon/BeautySalonDatabaseImplement/Models/Purchase.cs b/BeautySalon/BeautySalonDatabaseImplement/Models/Purchase.cs index 6fbb1bb..3664baa 100644 --- a/BeautySalon/BeautySalonDatabaseImplement/Models/Purchase.cs +++ b/BeautySalon/BeautySalonDatabaseImplement/Models/Purchase.cs @@ -4,11 +4,11 @@ using BeautySalonContracts.ViewModels; namespace BeautySalonDatabaseImplement.Models { - public class Purchase + internal class Purchase { - public int Id { get; set; } - public DateTime Date { get; set; } - public double Sum { get; set; } + public int Id { get; private set; } + public DateTime Date { get; private set; } + public double Sum { get; private set; } public static Purchase? Create(PurchaseBindingModel model) { if (model == null) diff --git a/BeautySalon/BeautySalonDatabaseImplement/Models/Receipt.cs b/BeautySalon/BeautySalonDatabaseImplement/Models/Receipt.cs index f6bb5e4..9de52d8 100644 --- a/BeautySalon/BeautySalonDatabaseImplement/Models/Receipt.cs +++ b/BeautySalon/BeautySalonDatabaseImplement/Models/Receipt.cs @@ -4,11 +4,11 @@ using BeautySalonContracts.ViewModels; namespace BeautySalonDatabaseImplement.Models { - public class Receipt + internal class Receipt { - public int Id { get; set; } - public DateTime Date { get; set; } - public double Sum { get; set; } + public int Id { get; private set; } + public DateTime Date { get; private set; } + public double Sum { get; private set; } public static Receipt? Create(ReceiptBindingModel model) { if (model == null) diff --git a/BeautySalon/BeautySalonDatabaseImplement/Models/Visit.cs b/BeautySalon/BeautySalonDatabaseImplement/Models/Visit.cs index 67275c1..dda389c 100644 --- a/BeautySalon/BeautySalonDatabaseImplement/Models/Visit.cs +++ b/BeautySalon/BeautySalonDatabaseImplement/Models/Visit.cs @@ -4,11 +4,11 @@ using BeautySalonContracts.ViewModels; namespace BeautySalonDatabaseImplement.Models { - public class Visit + internal class Visit { - public int Id { get; set; } - public DateTime Date { get; set; } - public double Sum { get; set; } + public int Id { get; private set; } + public DateTime Date { get; private set; } + public double Sum { get; private set; } public static Visit? Create(VisitBindingModel model) {