кроссовка

This commit is contained in:
Milana Ievlewa 2024-05-29 21:43:43 +04:00
parent 7714e1e252
commit 1d82a24e15
55 changed files with 375 additions and 2182 deletions

View File

@ -15,13 +15,14 @@
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Logging.Log4Net.AspNetCore" Version="6.1.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BeautySalonBusinessLogic\BeautySalonBusinessLogic.csproj" />
<ProjectReference Include="..\BeautySalonContracts\BeautySalonContracts.csproj" />
<ProjectReference Include="..\BeautySalonDatabaseImplement\BeautySalonDatabaseImplement.csproj" />
<ProjectReference Include="..\BeautySalonDataModels\BeautySalonDataModels.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BeautySalonBusinesLogic\BeautySalonBusinesLogic.csproj" />
<ProjectReference Include="..\BeautySalonContracts\BeautySalonContracts.csproj" />
<ProjectReference Include="..\BeautySalonDatabaseImplement\BeautySalonDatabaseImplement.csproj" />
</ItemGroup>
</Project>

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>

View File

@ -4,9 +4,14 @@ using BeautySalonContracts.SearchModels;
using BeautySalonContracts.StoragesContracts;
using BeautySalonContracts.ViewModels;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace BeautySalonBusinessLogic.BusinessLogics
namespace BeautySalonBusinesLogic.BusinessLogic
{
public class ClientLogic : IClientLogic
{
@ -158,4 +163,4 @@ namespace BeautySalonBusinessLogic.BusinessLogics
}
}
}
}
}

View File

@ -10,7 +10,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeautySalonBusinessLogic.BusinessLogics
namespace BeautySalonBusinesLogic.BusinessLogic
{
public class CosmeticLogic : ICosmeticLogic
{

View File

@ -10,7 +10,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeautySalonBusinessLogic.BusinessLogics
namespace BeautySalonBusinesLogic.BusinessLogic
{
public class EvaluationLogic : IEvaluationLogic
{
@ -21,7 +21,7 @@ namespace BeautySalonBusinessLogic.BusinessLogics
_logger = logger;
_evaluationStorage = evaluationStorage;
}
public List<EvaluationViewModel>? ReadList(EvaluationSearchModel? model)
{
_logger.LogInformation("ReadList. Id: {Id}",

View File

@ -10,7 +10,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeautySalonBusinessLogic.BusinessLogics
namespace BeautySalonBusinesLogic.BusinessLogic
{
public class LaborCostsLogic : ILaborCostsLogic
{

View File

@ -0,0 +1,90 @@
using Microsoft.Extensions.Logging;
using BeautySalonContracts.BindingModels;
using BeautySalonContracts.BusinessLogicsContracts;
using BeautySalonContracts.SearchModels;
using BeautySalonContracts.StoragesContracts;
using BeautySalonContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeautySalonBusinesLogic.BusinessLogic
{
public class MessageInfoLogic : IMessageInfoLogic
{
private readonly ILogger _logger;
private readonly IMessageInfoStorage _messageInfoStorage;
private readonly IClientStorage _clientStorage;
public MessageInfoLogic(ILogger<MessageInfoLogic> logger, IMessageInfoStorage messageInfoStorage, IClientStorage clientStorage)
{
_logger = logger;
_messageInfoStorage = messageInfoStorage;
_clientStorage = clientStorage;
}
public List<MessageInfoViewModel>? ReadList(MessageInfoSearchModel? model)
{
_logger.LogInformation("ReadList. MessageId:{MessageId}.ClientId:{ClientId}", model?.MessageId, model?.ClientId);
var list = model == null ? _messageInfoStorage.GetFullList() : _messageInfoStorage.GetFilteredList(model);
if (list == null)
{
_logger.LogWarning("ReadList return null list");
return null;
}
_logger.LogInformation("ReadList. Count:{Count}", list.Count);
return list;
}
public bool Create(MessageInfoBindingModel model)
{
CheckModel(model);
if (_messageInfoStorage.Insert(model) == null)
{
_logger.LogWarning("Insert operation failed");
return false;
}
return true;
}
private void CheckModel(MessageInfoBindingModel model, bool withParams = true)
{
if (model == null)
{
throw new ArgumentNullException(nameof(model));
}
if (!withParams)
{
return;
}
if (string.IsNullOrEmpty(model.MessageId))
{
throw new ArgumentNullException("Не указан id сообщения", nameof(model.MessageId));
}
if (string.IsNullOrEmpty(model.SenderName))
{
throw new ArgumentNullException("Не указао почта", nameof(model.SenderName));
}
if (string.IsNullOrEmpty(model.Subject))
{
throw new ArgumentNullException("Не указана тема", nameof(model.Subject));
}
if (string.IsNullOrEmpty(model.Body))
{
throw new ArgumentNullException("Не указан текст сообщения", nameof(model.Subject));
}
_logger.LogInformation("MessageInfo. MessageId:{MessageId}.SenderName:{SenderName}.Subject:{Subject}.Body:{Body}", model.MessageId, model.SenderName, model.Subject, model.Body);
var element = _clientStorage.GetElement(new ClientSearchModel
{
ClientEmail = model.SenderName
});
if (element == null)
{
_logger.LogWarning("Не удалоссь найти клиента, отправившего письмо с адреса Email:{Email}", model.SenderName);
}
else
{
model.ClientId = element.Id;
}
}
}
}

View File

@ -1,4 +1,4 @@
using BeautySalonBusinessLogic.MailWorker;
using BeautySalonBusinesLogic.MailWorker;
using BeautySalonContracts.BindingModels;
using BeautySalonContracts.BusinessLogicContracts;
using BeautySalonContracts.SearchModels;
@ -12,7 +12,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeautySalonBusinessLogic.BusinessLogics
namespace BeautySalonBusinesLogic.BusinessLogic
{
public class OrderLogic : IOrderLogic
{
@ -150,7 +150,7 @@ namespace BeautySalonBusinessLogic.BusinessLogics
}
_mailWorker.MailSendAsync(new()
{
MailAddress = client.Email,
MailAddress = client.ClientEmail,
Subject = subject,
Text = text
});

View File

@ -10,7 +10,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeautySalonBusinessLogic.BusinessLogics
namespace BeautySalonBusinesLogic.BusinessLogic
{
public class ProcedureLogic : IProcedureLogic
{
@ -21,7 +21,7 @@ namespace BeautySalonBusinessLogic.BusinessLogics
_logger = logger;
_procedureStorage = procedureStorage;
}
public List<ProcedureViewModel>? ReadList(ProcedureSearchModel? model)
{

View File

@ -1,17 +1,17 @@
using System;
using BeautySalonContracts.BusinessLogicsContracts;
using BeautySalonContracts.StoragesContracts;
using BeautySalonContracts.BindingModels;
using BeautySalonContracts.SearchModels;
using BeatySalonBusinesLogic.OfficePackage.HelperModels;
using BeautySalonContracts.ViewModels;
using BeatySalonBusinesLogic.OfficePackage;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BeautySalonContracts.BusinessLogicsContracts;
using BeautySalonContracts.StoragesContracts;
using BeautySalonContracts.BindingModels;
using BeautySalonContracts.SearchModels;
using BeatySalonBusinessLogic.OfficePackage.HelperModels;
using BeautySalonContracts.ViewModels;
using BeatySalonBusinessLogic.OfficePackage;
namespace BeautySalonBusinessLogic.BusinessLogic
namespace BeautySalonBusinesLogic.BusinessLogic
{
public class ReportLogic : IReportLogic
{
@ -117,7 +117,7 @@ namespace BeautySalonBusinessLogic.BusinessLogic
Id = x.Id,
ProcedureName = x.ServiceProcedures.Select(kv => kv.Value.Item1.ProcedureName).FirstOrDefault(),
CosmeticName = x.ServiceCosmetics.Select(kv => kv.Value.Item1.CosmeticName).FirstOrDefault(),
ServicePrice = x.ServiceProcedures.Sum(kv => kv.Value.Item1.ProcedurePrice) +
ServicePrice = x.ServiceProcedures.Sum(kv => kv.Value.Item1.ProcedurePrice) +
x.ServiceCosmetics.Sum(kv => kv.Value.Item1.CosmeticPrice)
}).ToList();
return r;
@ -131,7 +131,7 @@ namespace BeautySalonBusinessLogic.BusinessLogic
FileName = model.FileName,
Title = "Список процедур по косметике",
CosmeticProcedures = GetCosmeticProcedures()
});
});
}
public void SaveCosmeticProceduresToExcelFile(ReportBindingModel model)
{

View File

@ -10,7 +10,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeautySalonBusinessLogic.BusinessLogics
namespace BeautySalonBusinesLogic.BusinessLogic
{
public class ServiceLogic : IServiceLogic
{

View File

@ -5,7 +5,7 @@ using BeautySalonContracts.StoragesContracts;
using BeautySalonContracts.ViewModels;
using Microsoft.Extensions.Logging;
namespace BeautySalonBusinessLogic.BusinessLogics
namespace BeautySalonBusinesLogic.BusinessLogic
{
public class StaffMemberLogic : IStaffMemberLogic
{

View File

@ -0,0 +1,85 @@
using Microsoft.Extensions.Logging;
using BeautySalonContracts.BindingModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BeautySalonContracts.BusinessLogicsContracts;
namespace BeautySalonBusinesLogic.MailWorker
{
public abstract class AbstractMailWorker
{
protected string _mailLogin = string.Empty;
protected string _mailPassword = string.Empty;
protected string _smtpClientHost = string.Empty;
protected int _smtpClientPort;
protected string _popHost = string.Empty;
protected int _popPort;
private readonly IMessageInfoLogic _messageInfoLogic;
private readonly ILogger _logger;
public AbstractMailWorker(ILogger<AbstractMailWorker> logger, IMessageInfoLogic messageInfoLogic)
{
_logger = logger;
_messageInfoLogic = messageInfoLogic;
}
public void MailConfig(MailConfigBindingModel config)
{
_mailLogin = config.MailLogin;
_mailPassword = config.MailPassword;
_smtpClientHost = config.SmtpClientHost;
_smtpClientPort = config.SmtpClientPort;
_popHost = config.PopHost;
_popPort = config.PopPort;
_logger.LogDebug("Config: {login}, {password}, {clientHost}, {clientPOrt}, {popHost}, {popPort}", _mailLogin, _mailPassword.Length, _smtpClientHost, _smtpClientPort, _popHost, _popPort);
}
public async void MailSendAsync(MailSendInfoBindingModel info)
{
if (string.IsNullOrEmpty(_mailLogin) || string.IsNullOrEmpty(_mailPassword))
{
return;
}
if (string.IsNullOrEmpty(_smtpClientHost) || _smtpClientPort == 0)
{
return;
}
if (string.IsNullOrEmpty(info.MailAddress) || string.IsNullOrEmpty(info.Subject) || string.IsNullOrEmpty(info.Text))
{
return;
}
_logger.LogDebug("Send Mail: {To}, {Subject}", info.MailAddress, info.Subject);
await SendMailAsync(info);
}
public async void MailCheck()
{
if (string.IsNullOrEmpty(_mailLogin) || string.IsNullOrEmpty(_mailPassword))
{
return;
}
if (string.IsNullOrEmpty(_popHost) || _popPort == 0)
{
return;
}
if (_messageInfoLogic == null)
{
return;
}
var list = await ReceiveMailAsync();
_logger.LogDebug("Check Mail: {Count} new mails", list.Count);
foreach (var mail in list)
{
_messageInfoLogic.Create(mail);
}
}
protected abstract Task SendMailAsync(MailSendInfoBindingModel info);
protected abstract Task<List<MessageInfoBindingModel>> ReceiveMailAsync();
}
}

View File

@ -0,0 +1,82 @@
using MailKit.Net.Pop3;
using MailKit.Security;
using Microsoft.Extensions.Logging;
using BeautySalonContracts.BindingModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Mail;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using BeautySalonContracts.BusinessLogicsContracts;
namespace BeautySalonBusinesLogic.MailWorker
{
public class MailKitWorker : AbstractMailWorker
{
public MailKitWorker(ILogger<MailKitWorker> logger, IMessageInfoLogic messageInfoLogic) : base(logger, messageInfoLogic) { }
protected override async Task SendMailAsync(MailSendInfoBindingModel info)
{
using var objMailMessage = new MailMessage();
using var objSmtpClient = new SmtpClient(_smtpClientHost, _smtpClientPort);
try
{
objMailMessage.From = new MailAddress(_mailLogin);
objMailMessage.To.Add(new MailAddress(info.MailAddress));
objMailMessage.Subject = info.Subject;
objMailMessage.Body = info.Text;
objMailMessage.SubjectEncoding = Encoding.UTF8;
objMailMessage.BodyEncoding = Encoding.UTF8;
objSmtpClient.UseDefaultCredentials = false;
objSmtpClient.EnableSsl = true;
objSmtpClient.DeliveryMethod = SmtpDeliveryMethod.Network;
objSmtpClient.Credentials = new NetworkCredential(_mailLogin, _mailPassword);
await Task.Run(() => objSmtpClient.Send(objMailMessage));
}
catch (Exception)
{
throw;
}
}
protected override async Task<List<MessageInfoBindingModel>> ReceiveMailAsync()
{
var list = new List<MessageInfoBindingModel>();
using var client = new Pop3Client();
await Task.Run(() =>
{
try
{
client.Connect(_popHost, _popPort, SecureSocketOptions.SslOnConnect);
client.Authenticate(_mailLogin, _mailPassword);
for (int i = 0; i < client.Count; i++)
{
var message = client.GetMessage(i);
foreach (var mail in message.From.Mailboxes)
{
list.Add(new MessageInfoBindingModel
{
DateDelivery = message.Date.DateTime,
MessageId = message.MessageId,
SenderName = mail.Address,
Subject = message.Subject,
Body = message.TextBody
});
}
}
}
catch (MailKit.Security.AuthenticationException)
{ }
finally
{
client.Disconnect(true);
}
});
return list;
}
}
}

View File

@ -1,12 +1,12 @@
using BeatySalonBusinessLogic.OfficePackage.HelperEnums;
using BeatySalonBusinessLogic.OfficePackage.HelperModels;
using BeatySalonBusinesLogic.OfficePackage.HelperEnums;
using BeatySalonBusinesLogic.OfficePackage.HelperModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeatySalonBusinessLogic.OfficePackage
namespace BeatySalonBusinesLogic.OfficePackage
{
public abstract class AbstractSaveToExcelStorekeeper
{

View File

@ -1,12 +1,12 @@
using BeatySalonBusinessLogic.OfficePackage.HelperEnums;
using BeatySalonBusinessLogic.OfficePackage.HelperModels;
using BeatySalonBusinesLogic.OfficePackage.HelperEnums;
using BeatySalonBusinesLogic.OfficePackage.HelperModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeatySalonBusinessLogic.OfficePackage
namespace BeatySalonBusinesLogic.OfficePackage
{
public abstract class AbstractSaveToExcelWorker
{

View File

@ -1,12 +1,12 @@
using BeatySalonBusinessLogic.OfficePackage.HelperEnums;
using BeatySalonBusinessLogic.OfficePackage.HelperModels;
using BeatySalonBusinesLogic.OfficePackage.HelperEnums;
using BeatySalonBusinesLogic.OfficePackage.HelperModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeatySalonBusinessLogic.OfficePackage
namespace BeatySalonBusinesLogic.OfficePackage
{
public abstract class AbstractSaveToPdfStorekeeper//services
{

View File

@ -1,12 +1,12 @@
using BeatySalonBusinessLogic.OfficePackage.HelperEnums;
using BeatySalonBusinessLogic.OfficePackage.HelperModels;
using BeatySalonBusinesLogic.OfficePackage.HelperEnums;
using BeatySalonBusinesLogic.OfficePackage.HelperModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeatySalonBusinessLogic.OfficePackage
namespace BeatySalonBusinesLogic.OfficePackage
{
public abstract class AbstractSaveToPdfWorker//orders
{

View File

@ -1,12 +1,12 @@
using BeatySalonBusinessLogic.OfficePackage.HelperEnums;
using BeatySalonBusinessLogic.OfficePackage.HelperModels;
using BeatySalonBusinesLogic.OfficePackage.HelperEnums;
using BeatySalonBusinesLogic.OfficePackage.HelperModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeatySalonBusinessLogic.OfficePackage
namespace BeatySalonBusinesLogic.OfficePackage
{
public abstract class AbstractSaveToWordStorekeeper
{

View File

@ -1,12 +1,12 @@
using BeatySalonBusinessLogic.OfficePackage.HelperEnums;
using BeatySalonBusinessLogic.OfficePackage.HelperModels;
using BeatySalonBusinesLogic.OfficePackage.HelperEnums;
using BeatySalonBusinesLogic.OfficePackage.HelperModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeatySalonBusinessLogic.OfficePackage
namespace BeatySalonBusinesLogic.OfficePackage
{
public abstract class AbstractSaveToWordWorker
{

View File

@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeatySalonBusinessLogic.OfficePackage.HelperEnums
namespace BeatySalonBusinesLogic.OfficePackage.HelperEnums
{
public enum ExcelStyleInfoType
{

View File

@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeatySalonBusinessLogic.OfficePackage.HelperEnums
namespace BeatySalonBusinesLogic.OfficePackage.HelperEnums
{
public enum PdfParagraphAlignmentType
{

View File

@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeatySalonBusinessLogic.OfficePackage.HelperEnums
namespace BeatySalonBusinesLogic.OfficePackage.HelperEnums
{
public enum WordJustificationType
{

View File

@ -1,11 +1,11 @@
using BeatySalonBusinessLogic.OfficePackage.HelperEnums;
using BeatySalonBusinesLogic.OfficePackage.HelperEnums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeatySalonBusinessLogic.OfficePackage.HelperModels
namespace BeatySalonBusinesLogic.OfficePackage.HelperModels
{
public class ExcelCellParameters
{

View File

@ -5,7 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeatySalonBusinessLogic.OfficePackage.HelperModels
namespace BeatySalonBusinesLogic.OfficePackage.HelperModels
{
public class ExcelInfo
{

View File

@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeatySalonBusinessLogic.OfficePackage.HelperModels
namespace BeatySalonBusinesLogic.OfficePackage.HelperModels
{
public class ExcelMergeParameters
{

View File

@ -5,7 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeatySalonBusinessLogic.OfficePackage.HelperModels
namespace BeatySalonBusinesLogic.OfficePackage.HelperModels
{
public class PdfInfo
{

View File

@ -1,11 +1,11 @@
using BeatySalonBusinessLogic.OfficePackage.HelperEnums;
using BeatySalonBusinesLogic.OfficePackage.HelperEnums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeatySalonBusinessLogic.OfficePackage.HelperModels
namespace BeatySalonBusinesLogic.OfficePackage.HelperModels
{
public class PdfParagraph
{

View File

@ -1,11 +1,11 @@
using BeatySalonBusinessLogic.OfficePackage.HelperEnums;
using BeatySalonBusinesLogic.OfficePackage.HelperEnums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeatySalonBusinessLogic.OfficePackage.HelperModels
namespace BeatySalonBusinesLogic.OfficePackage.HelperModels
{
public class PdfRowParameters
{

View File

@ -5,7 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeatySalonBusinessLogic.OfficePackage.HelperModels
namespace BeatySalonBusinesLogic.OfficePackage.HelperModels
{
public class WordInfo
{

View File

@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeatySalonBusinessLogic.OfficePackage.HelperModels
namespace BeatySalonBusinesLogic.OfficePackage.HelperModels
{
public class WordParagraph
{

View File

@ -1,11 +1,11 @@
using BeatySalonBusinessLogic.OfficePackage.HelperEnums;
using BeatySalonBusinesLogic.OfficePackage.HelperEnums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeatySalonBusinessLogic.OfficePackage.HelperModels
namespace BeatySalonBusinesLogic.OfficePackage.HelperModels
{
public class WordTextProperties
{

View File

@ -3,15 +3,15 @@ using DocumentFormat.OpenXml.Office2013.Excel;
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Spreadsheet;
using DocumentFormat.OpenXml;
using BeatySalonBusinessLogic.OfficePackage.HelperEnums;
using BeatySalonBusinessLogic.OfficePackage.HelperModels;
using BeatySalonBusinesLogic.OfficePackage.HelperEnums;
using BeatySalonBusinesLogic.OfficePackage.HelperModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeatySalonBusinessLogic.OfficePackage.Implements
namespace BeatySalonBusinesLogic.OfficePackage.Implements
{
public class SaveToExcelStorekeeper : AbstractSaveToExcelStorekeeper
{

View File

@ -3,15 +3,15 @@ using DocumentFormat.OpenXml.Office2013.Excel;
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Spreadsheet;
using DocumentFormat.OpenXml;
using BeatySalonBusinessLogic.OfficePackage.HelperEnums;
using BeatySalonBusinessLogic.OfficePackage.HelperModels;
using BeatySalonBusinesLogic.OfficePackage.HelperEnums;
using BeatySalonBusinesLogic.OfficePackage.HelperModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeatySalonBusinessLogic.OfficePackage.Implements
namespace BeatySalonBusinesLogic.OfficePackage.Implements
{
public class SaveToExcelWorker : AbstractSaveToExcelWorker
{

View File

@ -1,15 +1,15 @@
using MigraDoc.DocumentObjectModel;
using MigraDoc.DocumentObjectModel.Tables;
using MigraDoc.Rendering;
using BeatySalonBusinessLogic.OfficePackage.HelperEnums;
using BeatySalonBusinessLogic.OfficePackage.HelperModels;
using BeatySalonBusinesLogic.OfficePackage.HelperEnums;
using BeatySalonBusinesLogic.OfficePackage.HelperModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeatySalonBusinessLogic.OfficePackage.Implements
namespace BeatySalonBusinesLogic.OfficePackage.Implements
{
public class SaveToPdfStorekeeper : AbstractSaveToPdfStorekeeper
{

View File

@ -1,15 +1,15 @@
using MigraDoc.DocumentObjectModel;
 using MigraDoc.DocumentObjectModel;
using MigraDoc.DocumentObjectModel.Tables;
using MigraDoc.Rendering;
using BeatySalonBusinessLogic.OfficePackage.HelperEnums;
using BeatySalonBusinessLogic.OfficePackage.HelperModels;
using BeatySalonBusinesLogic.OfficePackage.HelperEnums;
using BeatySalonBusinesLogic.OfficePackage.HelperModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeatySalonBusinessLogic.OfficePackage.Implements
namespace BeatySalonBusinesLogic.OfficePackage.Implements
{
public class SaveToPdfWorker : AbstractSaveToPdfWorker
{

View File

@ -1,8 +1,8 @@
using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Wordprocessing;
using BeatySalonBusinessLogic.OfficePackage.HelperEnums;
using BeatySalonBusinessLogic.OfficePackage.HelperModels;
using BeatySalonBusinesLogic.OfficePackage.HelperEnums;
using BeatySalonBusinesLogic.OfficePackage.HelperModels;
using System;
using System.Collections.Generic;
using System.Linq;
@ -13,7 +13,7 @@ using static System.Net.Mime.MediaTypeNames;
using Document = DocumentFormat.OpenXml.Wordprocessing.Document;
using Text = DocumentFormat.OpenXml.Wordprocessing.Text;
namespace BeatySalonBusinessLogic.OfficePackage.Implements
namespace BeatySalonBusinesLogic.OfficePackage.Implements
{
public class SaveToWordStorekeeper : AbstractSaveToWordStorekeeper
{

View File

@ -1,8 +1,8 @@
using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Wordprocessing;
using BeatySalonBusinessLogic.OfficePackage.HelperEnums;
using BeatySalonBusinessLogic.OfficePackage.HelperModels;
using BeatySalonBusinesLogic.OfficePackage.HelperEnums;
using BeatySalonBusinesLogic.OfficePackage.HelperModels;
using System;
using System.Collections.Generic;
using System.Linq;
@ -13,7 +13,7 @@ using static System.Net.Mime.MediaTypeNames;
using Document = DocumentFormat.OpenXml.Wordprocessing.Document;
using Text = DocumentFormat.OpenXml.Wordprocessing.Text;
namespace BeatySalonBusinessLogic.OfficePackage.Implements
namespace BeatySalonBusinesLogic.OfficePackage.Implements
{
public class SaveToWordWorker : AbstractSaveToWordWorker
{

View File

@ -1,90 +0,0 @@
using Microsoft.Extensions.Logging;
using BeautySalonContracts.BindingModels;
using BeautySalonContracts.BusinessLogicsContracts;
using BeautySalonContracts.SearchModels;
using BeautySalonContracts.StoragesContracts;
using BeautySalonContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeatySalonBusinessLogic.BusinessLogics
{
public class MessageInfoLogic : IMessageInfoLogic
{
private readonly ILogger _logger;
private readonly IMessageInfoStorage _messageInfoStorage;
private readonly IClientStorage _clientStorage;
public MessageInfoLogic(ILogger<MessageInfoLogic> logger, IMessageInfoStorage messageInfoStorage, IClientStorage clientStorage)
{
_logger = logger;
_messageInfoStorage = messageInfoStorage;
_clientStorage = clientStorage;
}
public List<MessageInfoViewModel>? ReadList(MessageInfoSearchModel? model)
{
_logger.LogInformation("ReadList. MessageId:{MessageId}.ClientId:{ClientId}", model?.MessageId, model?.ClientId);
var list = model == null ? _messageInfoStorage.GetFullList() : _messageInfoStorage.GetFilteredList(model);
if (list == null)
{
_logger.LogWarning("ReadList return null list");
return null;
}
_logger.LogInformation("ReadList. Count:{Count}", list.Count);
return list;
}
public bool Create(MessageInfoBindingModel model)
{
CheckModel(model);
if (_messageInfoStorage.Insert(model) == null)
{
_logger.LogWarning("Insert operation failed");
return false;
}
return true;
}
private void CheckModel(MessageInfoBindingModel model, bool withParams = true)
{
if (model == null)
{
throw new ArgumentNullException(nameof(model));
}
if (!withParams)
{
return;
}
if (string.IsNullOrEmpty(model.MessageId))
{
throw new ArgumentNullException("Не указан id сообщения", nameof(model.MessageId));
}
if (string.IsNullOrEmpty(model.SenderName))
{
throw new ArgumentNullException("Не указао почта", nameof(model.SenderName));
}
if (string.IsNullOrEmpty(model.Subject))
{
throw new ArgumentNullException("Не указана тема", nameof(model.Subject));
}
if (string.IsNullOrEmpty(model.Body))
{
throw new ArgumentNullException("Не указан текст сообщения", nameof(model.Subject));
}
_logger.LogInformation("MessageInfo. MessageId:{MessageId}.SenderName:{SenderName}.Subject:{Subject}.Body:{Body}", model.MessageId, model.SenderName, model.Subject, model.Body);
var element = _clientStorage.GetElement(new ClientSearchModel
{
ClientEmail = model.SenderName
});
if (element == null)
{
_logger.LogWarning("Не удалоссь найти клиента, отправившего письмо с адреса Email:{Email}", model.SenderName);
}
else
{
model.ClientId = element.Id;
}
}
}
}

View File

@ -1,85 +0,0 @@
using Microsoft.Extensions.Logging;
using BeautySalonContracts.BindingModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BeautySalonContracts.BusinessLogicsContracts;
namespace BeautySalonBusinessLogic.MailWorker
{
public abstract class AbstractMailWorker
{
protected string _mailLogin = string.Empty;
protected string _mailPassword = string.Empty;
protected string _smtpClientHost = string.Empty;
protected int _smtpClientPort;
protected string _popHost = string.Empty;
protected int _popPort;
private readonly IMessageInfoLogic _messageInfoLogic;
private readonly ILogger _logger;
public AbstractMailWorker(ILogger<AbstractMailWorker> logger, IMessageInfoLogic messageInfoLogic)
{
_logger = logger;
_messageInfoLogic = messageInfoLogic;
}
public void MailConfig(MailConfigBindingModel config)
{
_mailLogin = config.MailLogin;
_mailPassword = config.MailPassword;
_smtpClientHost = config.SmtpClientHost;
_smtpClientPort = config.SmtpClientPort;
_popHost = config.PopHost;
_popPort = config.PopPort;
_logger.LogDebug("Config: {login}, {password}, {clientHost}, {clientPOrt}, {popHost}, {popPort}", _mailLogin, _mailPassword.Length, _smtpClientHost, _smtpClientPort, _popHost, _popPort);
}
public async void MailSendAsync(MailSendInfoBindingModel info)
{
if (string.IsNullOrEmpty(_mailLogin) || string.IsNullOrEmpty(_mailPassword))
{
return;
}
if (string.IsNullOrEmpty(_smtpClientHost) || _smtpClientPort == 0)
{
return;
}
if (string.IsNullOrEmpty(info.MailAddress) || string.IsNullOrEmpty(info.Subject) || string.IsNullOrEmpty(info.Text))
{
return;
}
_logger.LogDebug("Send Mail: {To}, {Subject}", info.MailAddress, info.Subject);
await SendMailAsync(info);
}
public async void MailCheck()
{
if (string.IsNullOrEmpty(_mailLogin) || string.IsNullOrEmpty(_mailPassword))
{
return;
}
if (string.IsNullOrEmpty(_popHost) || _popPort == 0)
{
return;
}
if (_messageInfoLogic == null)
{
return;
}
var list = await ReceiveMailAsync();
_logger.LogDebug("Check Mail: {Count} new mails", list.Count);
foreach (var mail in list)
{
_messageInfoLogic.Create(mail);
}
}
protected abstract Task SendMailAsync(MailSendInfoBindingModel info);
protected abstract Task<List<MessageInfoBindingModel>> ReceiveMailAsync();
}
}

View File

@ -1,82 +0,0 @@
using MailKit.Net.Pop3;
using MailKit.Security;
using Microsoft.Extensions.Logging;
using BeautySalonContracts.BindingModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Mail;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using BeautySalonContracts.BusinessLogicsContracts;
namespace BeautySalonBusinessLogic.MailWorker
{
public class MailKitWorker : AbstractMailWorker
{
public MailKitWorker(ILogger<MailKitWorker> logger, IMessageInfoLogic messageInfoLogic) : base(logger, messageInfoLogic) { }
protected override async Task SendMailAsync(MailSendInfoBindingModel info)
{
using var objMailMessage = new MailMessage();
using var objSmtpClient = new SmtpClient(_smtpClientHost, _smtpClientPort);
try
{
objMailMessage.From = new MailAddress(_mailLogin);
objMailMessage.To.Add(new MailAddress(info.MailAddress));
objMailMessage.Subject = info.Subject;
objMailMessage.Body = info.Text;
objMailMessage.SubjectEncoding = Encoding.UTF8;
objMailMessage.BodyEncoding = Encoding.UTF8;
objSmtpClient.UseDefaultCredentials = false;
objSmtpClient.EnableSsl = true;
objSmtpClient.DeliveryMethod = SmtpDeliveryMethod.Network;
objSmtpClient.Credentials = new NetworkCredential(_mailLogin, _mailPassword);
await Task.Run(() => objSmtpClient.Send(objMailMessage));
}
catch (Exception)
{
throw;
}
}
protected override async Task<List<MessageInfoBindingModel>> ReceiveMailAsync()
{
var list = new List<MessageInfoBindingModel>();
using var client = new Pop3Client();
await Task.Run(() =>
{
try
{
client.Connect(_popHost, _popPort, SecureSocketOptions.SslOnConnect);
client.Authenticate(_mailLogin, _mailPassword);
for (int i = 0; i < client.Count; i++)
{
var message = client.GetMessage(i);
foreach (var mail in message.From.Mailboxes)
{
list.Add(new MessageInfoBindingModel
{
DateDelivery = message.Date.DateTime,
MessageId = message.MessageId,
SenderName = mail.Address,
Subject = message.Subject,
Body = message.TextBody
});
}
}
}
catch (MailKit.Security.AuthenticationException)
{ }
finally
{
client.Disconnect(true);
}
});
return list;
}
}
}

View File

@ -7,8 +7,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\BeautySalonDataModels\BeautySalonDataModels.csproj" />
<ProjectReference Include="..\BeautySalonContracts\BusinessLogicContracts.csproj" />
<ProjectReference Include="..\BeautySalonDataModels\BeautySalonDataModels.csproj" />
</ItemGroup>
</Project>

View File

@ -1,5 +1,4 @@
using DocumentFormat.OpenXml.Drawing.Charts;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using BeautySalonDatabaseImplement.Models;
using System;
using System.Collections.Generic;

View File

@ -16,7 +16,6 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BeautySalonBusinessLogic\BeautySalonBusinessLogic.csproj" />
<ProjectReference Include="..\BeautySalonContracts\BeautySalonContracts.csproj" />
<ProjectReference Include="..\BeautySalonDataModels\BeautySalonDataModels.csproj" />
</ItemGroup>

View File

@ -31,7 +31,7 @@ namespace BeautySalonDatabaseImplement.Implements
.Select(x => x.GetViewModel)
.ToList();
}
return new();
}

View File

@ -1,660 +0,0 @@
// <auto-generated />
using System;
using BeautySalonDatabaseImplement;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace BeautySalonDatabaseImplement.Migrations
{
[DbContext(typeof(BeautySalonDatabase))]
[Migration("20240501140440_initial")]
partial class initial
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.17")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Client", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("ClientEmail")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("ClientFIO")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("ClientLogin")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("ClientPassword")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("ClientPhone")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Clients");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Cosmetic", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Brand")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("CosmeticName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<double>("CosmeticPrice")
.HasColumnType("float");
b.Property<int>("LaborCostId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("LaborCostId");
b.ToTable("Cosmetics");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.CosmeticProcedure", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("CosmeticId")
.HasColumnType("int");
b.Property<int>("ProcedureCosmeticCount")
.HasColumnType("int");
b.Property<int>("ProcedureId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("CosmeticId");
b.HasIndex("ProcedureId");
b.ToTable("CosmeticProcedures");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Evaluation", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("int");
b.Property<double>("PointsCosmetics")
.HasColumnType("float");
b.Property<double>("PointsProcedure")
.HasColumnType("float");
b.Property<int>("ProcedureId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("ClientId");
b.HasIndex("ProcedureId");
b.ToTable("Evaluations");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.LaborCosts", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Difficulty")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<int>("NumberHours")
.HasColumnType("int");
b.Property<int>("StaffMemberId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("StaffMemberId");
b.ToTable("LaborCosts");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.OrderCosmetic", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("CosmeticId")
.HasColumnType("int");
b.Property<int>("OrderId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("CosmeticId");
b.HasIndex("OrderId");
b.ToTable("OrderCosmetics");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.OrderProcedure", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("OrderId")
.HasColumnType("int");
b.Property<int>("OrderProcedureCount")
.HasColumnType("int");
b.Property<int>("ProcedureId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("OrderId");
b.HasIndex("ProcedureId");
b.ToTable("OrderProcedures");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.OrderService", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("OrderId")
.HasColumnType("int");
b.Property<int>("OrderServiceCount")
.HasColumnType("int");
b.Property<int>("ServiceId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("OrderId");
b.HasIndex("ServiceId");
b.ToTable("OrderServices");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Order_", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("int");
b.Property<double>("OrderAmount")
.HasColumnType("float");
b.Property<DateTime>("OrderDate")
.HasColumnType("datetime2");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("Orders");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Procedure", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("int");
b.Property<double>("ProcedureDuration")
.HasColumnType("float");
b.Property<string>("ProcedureName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<double>("ProcedurePrice")
.HasColumnType("float");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("Procedures");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Service", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("ServiceName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<double>("ServicePrice")
.HasColumnType("float");
b.Property<int>("StaffMemberId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("StaffMemberId");
b.ToTable("Services");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.ServiceCosmetic", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("CosmeticId")
.HasColumnType("int");
b.Property<int>("ServiceCosmeticCount")
.HasColumnType("int");
b.Property<int>("ServiceId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("CosmeticId");
b.HasIndex("ServiceId");
b.ToTable("ServiceCosmetics");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.ServiceProcedure", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("ProcedureId")
.HasColumnType("int");
b.Property<int>("ServiceId")
.HasColumnType("int");
b.Property<int>("ServiceProcedureCount")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("ProcedureId");
b.HasIndex("ServiceId");
b.ToTable("ServiceProcedures");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.StaffMember", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("StaffMemberEmail")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("StaffMemberFIO")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("StaffMemberLogin")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("StaffMemberPassword")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("StaffMemberPhone")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("StaffMemberSpecialty")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("StaffMembers");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Cosmetic", b =>
{
b.HasOne("BeautySalonDatabaseImplement.Models.LaborCosts", "LaborCost")
.WithMany("Cosmetics")
.HasForeignKey("LaborCostId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("LaborCost");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.CosmeticProcedure", b =>
{
b.HasOne("BeautySalonDatabaseImplement.Models.Cosmetic", "Cosmetic")
.WithMany("Procedures")
.HasForeignKey("CosmeticId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("BeautySalonDatabaseImplement.Models.Procedure", "Procedure")
.WithMany("Cosmetics")
.HasForeignKey("ProcedureId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Cosmetic");
b.Navigation("Procedure");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Evaluation", b =>
{
b.HasOne("BeautySalonDatabaseImplement.Models.Client", "Client")
.WithMany("Evaluations")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("BeautySalonDatabaseImplement.Models.Procedure", "Procedure")
.WithMany("Evaluations")
.HasForeignKey("ProcedureId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
b.Navigation("Procedure");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.LaborCosts", b =>
{
b.HasOne("BeautySalonDatabaseImplement.Models.StaffMember", "StaffMember")
.WithMany("LaborsCosts")
.HasForeignKey("StaffMemberId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("StaffMember");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.OrderCosmetic", b =>
{
b.HasOne("BeautySalonDatabaseImplement.Models.Cosmetic", "Cosmetic")
.WithMany("Orders")
.HasForeignKey("CosmeticId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("BeautySalonDatabaseImplement.Models.Order_", "Order")
.WithMany("Cosmetics")
.HasForeignKey("OrderId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Cosmetic");
b.Navigation("Order");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.OrderProcedure", b =>
{
b.HasOne("BeautySalonDatabaseImplement.Models.Order_", "Order")
.WithMany("Procedures")
.HasForeignKey("OrderId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("BeautySalonDatabaseImplement.Models.Procedure", "Procedure")
.WithMany("Orders")
.HasForeignKey("ProcedureId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Order");
b.Navigation("Procedure");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.OrderService", b =>
{
b.HasOne("BeautySalonDatabaseImplement.Models.Order_", "Order")
.WithMany("Services")
.HasForeignKey("OrderId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("BeautySalonDatabaseImplement.Models.Service", "Service")
.WithMany("Orders")
.HasForeignKey("ServiceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Order");
b.Navigation("Service");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Order_", b =>
{
b.HasOne("BeautySalonDatabaseImplement.Models.Client", "Client")
.WithMany("Orders")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Procedure", b =>
{
b.HasOne("BeautySalonDatabaseImplement.Models.Client", "Client")
.WithMany("Procedures")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Service", b =>
{
b.HasOne("BeautySalonDatabaseImplement.Models.StaffMember", "StaffMember")
.WithMany("Services")
.HasForeignKey("StaffMemberId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("StaffMember");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.ServiceCosmetic", b =>
{
b.HasOne("BeautySalonDatabaseImplement.Models.Cosmetic", "Cosmetic")
.WithMany("Services")
.HasForeignKey("CosmeticId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("BeautySalonDatabaseImplement.Models.Service", "Service")
.WithMany("Cosmetics")
.HasForeignKey("ServiceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Cosmetic");
b.Navigation("Service");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.ServiceProcedure", b =>
{
b.HasOne("BeautySalonDatabaseImplement.Models.Procedure", "Procedure")
.WithMany("Services")
.HasForeignKey("ProcedureId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("BeautySalonDatabaseImplement.Models.Service", "Service")
.WithMany("Procedures")
.HasForeignKey("ServiceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Procedure");
b.Navigation("Service");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Client", b =>
{
b.Navigation("Evaluations");
b.Navigation("Orders");
b.Navigation("Procedures");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Cosmetic", b =>
{
b.Navigation("Orders");
b.Navigation("Procedures");
b.Navigation("Services");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.LaborCosts", b =>
{
b.Navigation("Cosmetics");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Order_", b =>
{
b.Navigation("Cosmetics");
b.Navigation("Procedures");
b.Navigation("Services");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Procedure", b =>
{
b.Navigation("Cosmetics");
b.Navigation("Evaluations");
b.Navigation("Orders");
b.Navigation("Services");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Service", b =>
{
b.Navigation("Cosmetics");
b.Navigation("Orders");
b.Navigation("Procedures");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.StaffMember", b =>
{
b.Navigation("LaborsCosts");
b.Navigation("Services");
});
#pragma warning restore 612, 618
}
}
}

View File

@ -1,487 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BeautySalonDatabaseImplement.Migrations
{
/// <inheritdoc />
public partial class initial : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Clients",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
ClientLogin = table.Column<string>(type: "nvarchar(max)", nullable: false),
ClientFIO = table.Column<string>(type: "nvarchar(max)", nullable: false),
ClientEmail = table.Column<string>(type: "nvarchar(max)", nullable: false),
ClientPhone = table.Column<string>(type: "nvarchar(max)", nullable: false),
ClientPassword = table.Column<string>(type: "nvarchar(max)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Clients", x => x.Id);
});
migrationBuilder.CreateTable(
name: "StaffMembers",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
StaffMemberFIO = table.Column<string>(type: "nvarchar(max)", nullable: false),
StaffMemberSpecialty = table.Column<string>(type: "nvarchar(max)", nullable: false),
StaffMemberLogin = table.Column<string>(type: "nvarchar(max)", nullable: false),
StaffMemberEmail = table.Column<string>(type: "nvarchar(max)", nullable: false),
StaffMemberPassword = table.Column<string>(type: "nvarchar(max)", nullable: false),
StaffMemberPhone = table.Column<string>(type: "nvarchar(max)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_StaffMembers", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Orders",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
OrderDate = table.Column<DateTime>(type: "datetime2", nullable: false),
OrderAmount = table.Column<double>(type: "float", nullable: false),
ClientId = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Orders", x => x.Id);
table.ForeignKey(
name: "FK_Orders_Clients_ClientId",
column: x => x.ClientId,
principalTable: "Clients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Procedures",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
ProcedureName = table.Column<string>(type: "nvarchar(max)", nullable: false),
ProcedurePrice = table.Column<double>(type: "float", nullable: false),
ProcedureDuration = table.Column<double>(type: "float", nullable: false),
ClientId = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Procedures", x => x.Id);
table.ForeignKey(
name: "FK_Procedures_Clients_ClientId",
column: x => x.ClientId,
principalTable: "Clients",
principalColumn: "Id",
onDelete: ReferentialAction.NoAction);
});
migrationBuilder.CreateTable(
name: "LaborCosts",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
NumberHours = table.Column<int>(type: "int", nullable: false),
Difficulty = table.Column<string>(type: "nvarchar(max)", nullable: false),
StaffMemberId = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_LaborCosts", x => x.Id);
table.ForeignKey(
name: "FK_LaborCosts_StaffMembers_StaffMemberId",
column: x => x.StaffMemberId,
principalTable: "StaffMembers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Services",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
ServiceName = table.Column<string>(type: "nvarchar(max)", nullable: false),
ServicePrice = table.Column<double>(type: "float", nullable: false),
StaffMemberId = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Services", x => x.Id);
table.ForeignKey(
name: "FK_Services_StaffMembers_StaffMemberId",
column: x => x.StaffMemberId,
principalTable: "StaffMembers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Evaluations",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
PointsProcedure = table.Column<double>(type: "float", nullable: false),
PointsCosmetics = table.Column<double>(type: "float", nullable: false),
ProcedureId = table.Column<int>(type: "int", nullable: false),
ClientId = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Evaluations", x => x.Id);
table.ForeignKey(
name: "FK_Evaluations_Clients_ClientId",
column: x => x.ClientId,
principalTable: "Clients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_Evaluations_Procedures_ProcedureId",
column: x => x.ProcedureId,
principalTable: "Procedures",
principalColumn: "Id",
onDelete: ReferentialAction.NoAction);
});
migrationBuilder.CreateTable(
name: "OrderProcedures",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
OrderId = table.Column<int>(type: "int", nullable: false),
ProcedureId = table.Column<int>(type: "int", nullable: false),
OrderProcedureCount = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_OrderProcedures", x => x.Id);
table.ForeignKey(
name: "FK_OrderProcedures_Orders_OrderId",
column: x => x.OrderId,
principalTable: "Orders",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_OrderProcedures_Procedures_ProcedureId",
column: x => x.ProcedureId,
principalTable: "Procedures",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Cosmetics",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Brand = table.Column<string>(type: "nvarchar(max)", nullable: false),
CosmeticName = table.Column<string>(type: "nvarchar(max)", nullable: false),
CosmeticPrice = table.Column<double>(type: "float", nullable: false),
LaborCostId = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Cosmetics", x => x.Id);
table.ForeignKey(
name: "FK_Cosmetics_LaborCosts_LaborCostId",
column: x => x.LaborCostId,
principalTable: "LaborCosts",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "OrderServices",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
OrderId = table.Column<int>(type: "int", nullable: false),
ServiceId = table.Column<int>(type: "int", nullable: false),
OrderServiceCount = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_OrderServices", x => x.Id);
table.ForeignKey(
name: "FK_OrderServices_Orders_OrderId",
column: x => x.OrderId,
principalTable: "Orders",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_OrderServices_Services_ServiceId",
column: x => x.ServiceId,
principalTable: "Services",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ServiceProcedures",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
ServiceId = table.Column<int>(type: "int", nullable: false),
ProcedureId = table.Column<int>(type: "int", nullable: false),
ServiceProcedureCount = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ServiceProcedures", x => x.Id);
table.ForeignKey(
name: "FK_ServiceProcedures_Procedures_ProcedureId",
column: x => x.ProcedureId,
principalTable: "Procedures",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_ServiceProcedures_Services_ServiceId",
column: x => x.ServiceId,
principalTable: "Services",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "CosmeticProcedures",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
CosmeticId = table.Column<int>(type: "int", nullable: false),
ProcedureId = table.Column<int>(type: "int", nullable: false),
ProcedureCosmeticCount = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CosmeticProcedures", x => x.Id);
table.ForeignKey(
name: "FK_CosmeticProcedures_Cosmetics_CosmeticId",
column: x => x.CosmeticId,
principalTable: "Cosmetics",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_CosmeticProcedures_Procedures_ProcedureId",
column: x => x.ProcedureId,
principalTable: "Procedures",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "OrderCosmetics",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
OrderId = table.Column<int>(type: "int", nullable: false),
CosmeticId = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_OrderCosmetics", x => x.Id);
table.ForeignKey(
name: "FK_OrderCosmetics_Cosmetics_CosmeticId",
column: x => x.CosmeticId,
principalTable: "Cosmetics",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_OrderCosmetics_Orders_OrderId",
column: x => x.OrderId,
principalTable: "Orders",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ServiceCosmetics",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
CosmeticId = table.Column<int>(type: "int", nullable: false),
ServiceId = table.Column<int>(type: "int", nullable: false),
ServiceCosmeticCount = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ServiceCosmetics", x => x.Id);
table.ForeignKey(
name: "FK_ServiceCosmetics_Cosmetics_CosmeticId",
column: x => x.CosmeticId,
principalTable: "Cosmetics",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_ServiceCosmetics_Services_ServiceId",
column: x => x.ServiceId,
principalTable: "Services",
principalColumn: "Id",
onDelete: ReferentialAction.NoAction);
});
migrationBuilder.CreateIndex(
name: "IX_CosmeticProcedures_CosmeticId",
table: "CosmeticProcedures",
column: "CosmeticId");
migrationBuilder.CreateIndex(
name: "IX_CosmeticProcedures_ProcedureId",
table: "CosmeticProcedures",
column: "ProcedureId");
migrationBuilder.CreateIndex(
name: "IX_Cosmetics_LaborCostId",
table: "Cosmetics",
column: "LaborCostId");
migrationBuilder.CreateIndex(
name: "IX_Evaluations_ClientId",
table: "Evaluations",
column: "ClientId");
migrationBuilder.CreateIndex(
name: "IX_Evaluations_ProcedureId",
table: "Evaluations",
column: "ProcedureId");
migrationBuilder.CreateIndex(
name: "IX_LaborCosts_StaffMemberId",
table: "LaborCosts",
column: "StaffMemberId");
migrationBuilder.CreateIndex(
name: "IX_OrderCosmetics_CosmeticId",
table: "OrderCosmetics",
column: "CosmeticId");
migrationBuilder.CreateIndex(
name: "IX_OrderCosmetics_OrderId",
table: "OrderCosmetics",
column: "OrderId");
migrationBuilder.CreateIndex(
name: "IX_OrderProcedures_OrderId",
table: "OrderProcedures",
column: "OrderId");
migrationBuilder.CreateIndex(
name: "IX_OrderProcedures_ProcedureId",
table: "OrderProcedures",
column: "ProcedureId");
migrationBuilder.CreateIndex(
name: "IX_Orders_ClientId",
table: "Orders",
column: "ClientId");
migrationBuilder.CreateIndex(
name: "IX_OrderServices_OrderId",
table: "OrderServices",
column: "OrderId");
migrationBuilder.CreateIndex(
name: "IX_OrderServices_ServiceId",
table: "OrderServices",
column: "ServiceId");
migrationBuilder.CreateIndex(
name: "IX_Procedures_ClientId",
table: "Procedures",
column: "ClientId");
migrationBuilder.CreateIndex(
name: "IX_ServiceCosmetics_CosmeticId",
table: "ServiceCosmetics",
column: "CosmeticId");
migrationBuilder.CreateIndex(
name: "IX_ServiceCosmetics_ServiceId",
table: "ServiceCosmetics",
column: "ServiceId");
migrationBuilder.CreateIndex(
name: "IX_ServiceProcedures_ProcedureId",
table: "ServiceProcedures",
column: "ProcedureId");
migrationBuilder.CreateIndex(
name: "IX_ServiceProcedures_ServiceId",
table: "ServiceProcedures",
column: "ServiceId");
migrationBuilder.CreateIndex(
name: "IX_Services_StaffMemberId",
table: "Services",
column: "StaffMemberId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "CosmeticProcedures");
migrationBuilder.DropTable(
name: "Evaluations");
migrationBuilder.DropTable(
name: "OrderCosmetics");
migrationBuilder.DropTable(
name: "OrderProcedures");
migrationBuilder.DropTable(
name: "OrderServices");
migrationBuilder.DropTable(
name: "ServiceCosmetics");
migrationBuilder.DropTable(
name: "ServiceProcedures");
migrationBuilder.DropTable(
name: "Orders");
migrationBuilder.DropTable(
name: "Cosmetics");
migrationBuilder.DropTable(
name: "Procedures");
migrationBuilder.DropTable(
name: "Services");
migrationBuilder.DropTable(
name: "LaborCosts");
migrationBuilder.DropTable(
name: "Clients");
migrationBuilder.DropTable(
name: "StaffMembers");
}
}
}

View File

@ -1,657 +0,0 @@
// <auto-generated />
using System;
using BeautySalonDatabaseImplement;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace BeautySalonDatabaseImplement.Migrations
{
[DbContext(typeof(BeautySalonDatabase))]
partial class BeautySalonDatabaseModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.17")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Client", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("ClientEmail")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("ClientFIO")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("ClientLogin")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("ClientPassword")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("ClientPhone")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Clients");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Cosmetic", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Brand")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("CosmeticName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<double>("CosmeticPrice")
.HasColumnType("float");
b.Property<int>("LaborCostId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("LaborCostId");
b.ToTable("Cosmetics");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.CosmeticProcedure", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("CosmeticId")
.HasColumnType("int");
b.Property<int>("ProcedureCosmeticCount")
.HasColumnType("int");
b.Property<int>("ProcedureId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("CosmeticId");
b.HasIndex("ProcedureId");
b.ToTable("CosmeticProcedures");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Evaluation", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("int");
b.Property<double>("PointsCosmetics")
.HasColumnType("float");
b.Property<double>("PointsProcedure")
.HasColumnType("float");
b.Property<int>("ProcedureId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("ClientId");
b.HasIndex("ProcedureId");
b.ToTable("Evaluations");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.LaborCosts", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Difficulty")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<int>("NumberHours")
.HasColumnType("int");
b.Property<int>("StaffMemberId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("StaffMemberId");
b.ToTable("LaborCosts");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.OrderCosmetic", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("CosmeticId")
.HasColumnType("int");
b.Property<int>("OrderId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("CosmeticId");
b.HasIndex("OrderId");
b.ToTable("OrderCosmetics");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.OrderProcedure", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("OrderId")
.HasColumnType("int");
b.Property<int>("OrderProcedureCount")
.HasColumnType("int");
b.Property<int>("ProcedureId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("OrderId");
b.HasIndex("ProcedureId");
b.ToTable("OrderProcedures");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.OrderService", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("OrderId")
.HasColumnType("int");
b.Property<int>("OrderServiceCount")
.HasColumnType("int");
b.Property<int>("ServiceId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("OrderId");
b.HasIndex("ServiceId");
b.ToTable("OrderServices");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Order_", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("int");
b.Property<double>("OrderAmount")
.HasColumnType("float");
b.Property<DateTime>("OrderDate")
.HasColumnType("datetime2");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("Orders");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Procedure", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("int");
b.Property<double>("ProcedureDuration")
.HasColumnType("float");
b.Property<string>("ProcedureName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<double>("ProcedurePrice")
.HasColumnType("float");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("Procedures");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Service", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("ServiceName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<double>("ServicePrice")
.HasColumnType("float");
b.Property<int>("StaffMemberId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("StaffMemberId");
b.ToTable("Services");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.ServiceCosmetic", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("CosmeticId")
.HasColumnType("int");
b.Property<int>("ServiceCosmeticCount")
.HasColumnType("int");
b.Property<int>("ServiceId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("CosmeticId");
b.HasIndex("ServiceId");
b.ToTable("ServiceCosmetics");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.ServiceProcedure", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("ProcedureId")
.HasColumnType("int");
b.Property<int>("ServiceId")
.HasColumnType("int");
b.Property<int>("ServiceProcedureCount")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("ProcedureId");
b.HasIndex("ServiceId");
b.ToTable("ServiceProcedures");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.StaffMember", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("StaffMemberEmail")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("StaffMemberFIO")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("StaffMemberLogin")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("StaffMemberPassword")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("StaffMemberPhone")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("StaffMemberSpecialty")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("StaffMembers");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Cosmetic", b =>
{
b.HasOne("BeautySalonDatabaseImplement.Models.LaborCosts", "LaborCost")
.WithMany("Cosmetics")
.HasForeignKey("LaborCostId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("LaborCost");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.CosmeticProcedure", b =>
{
b.HasOne("BeautySalonDatabaseImplement.Models.Cosmetic", "Cosmetic")
.WithMany("Procedures")
.HasForeignKey("CosmeticId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("BeautySalonDatabaseImplement.Models.Procedure", "Procedure")
.WithMany("Cosmetics")
.HasForeignKey("ProcedureId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Cosmetic");
b.Navigation("Procedure");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Evaluation", b =>
{
b.HasOne("BeautySalonDatabaseImplement.Models.Client", "Client")
.WithMany("Evaluations")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("BeautySalonDatabaseImplement.Models.Procedure", "Procedure")
.WithMany("Evaluations")
.HasForeignKey("ProcedureId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
b.Navigation("Procedure");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.LaborCosts", b =>
{
b.HasOne("BeautySalonDatabaseImplement.Models.StaffMember", "StaffMember")
.WithMany("LaborsCosts")
.HasForeignKey("StaffMemberId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("StaffMember");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.OrderCosmetic", b =>
{
b.HasOne("BeautySalonDatabaseImplement.Models.Cosmetic", "Cosmetic")
.WithMany("Orders")
.HasForeignKey("CosmeticId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("BeautySalonDatabaseImplement.Models.Order_", "Order")
.WithMany("Cosmetics")
.HasForeignKey("OrderId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Cosmetic");
b.Navigation("Order");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.OrderProcedure", b =>
{
b.HasOne("BeautySalonDatabaseImplement.Models.Order_", "Order")
.WithMany("Procedures")
.HasForeignKey("OrderId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("BeautySalonDatabaseImplement.Models.Procedure", "Procedure")
.WithMany("Orders")
.HasForeignKey("ProcedureId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Order");
b.Navigation("Procedure");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.OrderService", b =>
{
b.HasOne("BeautySalonDatabaseImplement.Models.Order_", "Order")
.WithMany("Services")
.HasForeignKey("OrderId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("BeautySalonDatabaseImplement.Models.Service", "Service")
.WithMany("Orders")
.HasForeignKey("ServiceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Order");
b.Navigation("Service");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Order_", b =>
{
b.HasOne("BeautySalonDatabaseImplement.Models.Client", "Client")
.WithMany("Orders")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Procedure", b =>
{
b.HasOne("BeautySalonDatabaseImplement.Models.Client", "Client")
.WithMany("Procedures")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Service", b =>
{
b.HasOne("BeautySalonDatabaseImplement.Models.StaffMember", "StaffMember")
.WithMany("Services")
.HasForeignKey("StaffMemberId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("StaffMember");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.ServiceCosmetic", b =>
{
b.HasOne("BeautySalonDatabaseImplement.Models.Cosmetic", "Cosmetic")
.WithMany("Services")
.HasForeignKey("CosmeticId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("BeautySalonDatabaseImplement.Models.Service", "Service")
.WithMany("Cosmetics")
.HasForeignKey("ServiceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Cosmetic");
b.Navigation("Service");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.ServiceProcedure", b =>
{
b.HasOne("BeautySalonDatabaseImplement.Models.Procedure", "Procedure")
.WithMany("Services")
.HasForeignKey("ProcedureId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("BeautySalonDatabaseImplement.Models.Service", "Service")
.WithMany("Procedures")
.HasForeignKey("ServiceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Procedure");
b.Navigation("Service");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Client", b =>
{
b.Navigation("Evaluations");
b.Navigation("Orders");
b.Navigation("Procedures");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Cosmetic", b =>
{
b.Navigation("Orders");
b.Navigation("Procedures");
b.Navigation("Services");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.LaborCosts", b =>
{
b.Navigation("Cosmetics");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Order_", b =>
{
b.Navigation("Cosmetics");
b.Navigation("Procedures");
b.Navigation("Services");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Procedure", b =>
{
b.Navigation("Cosmetics");
b.Navigation("Evaluations");
b.Navigation("Orders");
b.Navigation("Services");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Service", b =>
{
b.Navigation("Cosmetics");
b.Navigation("Orders");
b.Navigation("Procedures");
});
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.StaffMember", b =>
{
b.Navigation("LaborsCosts");
b.Navigation("Services");
});
#pragma warning restore 612, 618
}
}
}

View File

@ -1,7 +1,6 @@
using BeautySalonContracts.BindingModels;
using BeautySalonContracts.ViewModels;
using BeautySalonDataModels.Models;
using DocumentFormat.OpenXml.Drawing.Charts;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
@ -24,7 +23,7 @@ namespace BeautySalonDatabaseImplement.Models
public string ClientPassword { get; set; } = string.Empty;
[ForeignKey("ClientId")]
public virtual List<Order> Orders { get; set; } = new();
public virtual List<Order_> Orders { get; set; } = new();
[ForeignKey("ClientId")]
public virtual List<MessageInfo> Messages { get; set; } = new();

View File

@ -12,7 +12,7 @@ using System.Threading.Tasks;
namespace BeautySalonDatabaseImplement.Models
{
public class Cosmetic : ICosmeticModel
{
{
public int Id { get; set; }
[Required]
public string Brand { get; set; } = string.Empty;
@ -32,24 +32,24 @@ namespace BeautySalonDatabaseImplement.Models
[ForeignKey("CosmeticId")]
private Dictionary<int, (IProcedureModel, int)>? _procedureCosmetics = null;//Это поле для хранения словаря OrderCosmetics.
private Dictionary<int, (IProcedureModel, int)>? _cosmeticProcedures = null;//Это поле для хранения словаря OrderCosmetics.
[NotMapped]
public Dictionary<int, (IProcedureModel, int)> ProcedureCosmetic
public Dictionary<int, (IProcedureModel, int)> CosmeticProcedures//представляет список косметики, участвующей в заказе. Не присутствует в базе данных.
{
get
{
if (_procedureCosmetics == null)
if (_cosmeticProcedures == null)
{
_procedureCosmetics = Procedures
.ToDictionary(recPC => recPC.ProcedureId, recPC =>
((IProcedureModel)recPC.Procedure, recPC.Count));
_cosmeticProcedures = Procedures
.ToDictionary(recPC => recPC.ProcedureId, recPC =>
(recPC.Procedure as IProcedureModel, recPC.Count));
}
return _procedureCosmetics;
return _cosmeticProcedures;
}
}
public virtual List<CosmeticProcedure> Procedures { get; set; } = new();//представляет список косметических товаров для данного заказ
//[ForeignKey("CosmeticId")]
//public virtual List<ServiceCosmetic> Services { get; set; } = new();
@ -115,7 +115,7 @@ namespace BeautySalonDatabaseImplement.Models
});
context.SaveChanges();
}
_procedureCosmetics = null;
_cosmeticProcedures = null;
}
}
}

View File

@ -2,7 +2,6 @@
using BeautySalonContracts.ViewModels;
using BeautySalonDataModels.Enums;
using BeautySalonDataModels.Models;
using DocumentFormat.OpenXml.Office2021.DocumentTasks;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

View File

@ -7,16 +7,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BeautySalonDataModels", "Be
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BeautySalonContracts", "BeautySalonContracts\BeautySalonContracts.csproj", "{A35AB656-0E91-49DC-A863-8448FCB56134}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BeautySalonDatabaseImplement", "BeautySalonDatabaseImplement\BeautySalonDatabaseImplement.csproj", "{419F530F-C58A-4059-8728-B4F6EC6FC174}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BeautySalonBusinessLogic", "BeautySalonBusinessLogic\BeautySalonBusinessLogic.csproj", "{36052005-AE3A-4700-B1CF-C95609D045C5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BeautySalonRestApi", "BeatySalonRestApi\BeautySalonRestApi.csproj", "{CF01D7E3-0253-4140-A472-C2CCD0C317B9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StorekeeperWebApp", "StaffMemberWebApp\StorekeeperWebApp.csproj", "{1D290AE2-6C45-4FAE-9F2A-7088B820D8F0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WorkerWebApp", "ClientWebApp\WorkerWebApp.csproj", "{274D43C4-43DE-46D8-9CB9-57A1EE96A4E6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BeautySalonDatabaseImplement", "BeautySalonDatabaseImplement\BeautySalonDatabaseImplement.csproj", "{11644885-00A6-4158-BA59-9FF3ACD2979C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BeautySalonBusinesLogic", "BeautySalonBusinesLogic\BeautySalonBusinesLogic.csproj", "{3777E5B5-3018-4BEC-9A1E-2C65198312EC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -31,14 +31,6 @@ Global
{A35AB656-0E91-49DC-A863-8448FCB56134}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A35AB656-0E91-49DC-A863-8448FCB56134}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A35AB656-0E91-49DC-A863-8448FCB56134}.Release|Any CPU.Build.0 = Release|Any CPU
{419F530F-C58A-4059-8728-B4F6EC6FC174}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{419F530F-C58A-4059-8728-B4F6EC6FC174}.Debug|Any CPU.Build.0 = Debug|Any CPU
{419F530F-C58A-4059-8728-B4F6EC6FC174}.Release|Any CPU.ActiveCfg = Release|Any CPU
{419F530F-C58A-4059-8728-B4F6EC6FC174}.Release|Any CPU.Build.0 = Release|Any CPU
{36052005-AE3A-4700-B1CF-C95609D045C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{36052005-AE3A-4700-B1CF-C95609D045C5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{36052005-AE3A-4700-B1CF-C95609D045C5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{36052005-AE3A-4700-B1CF-C95609D045C5}.Release|Any CPU.Build.0 = Release|Any CPU
{CF01D7E3-0253-4140-A472-C2CCD0C317B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CF01D7E3-0253-4140-A472-C2CCD0C317B9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CF01D7E3-0253-4140-A472-C2CCD0C317B9}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -51,6 +43,14 @@ Global
{274D43C4-43DE-46D8-9CB9-57A1EE96A4E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{274D43C4-43DE-46D8-9CB9-57A1EE96A4E6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{274D43C4-43DE-46D8-9CB9-57A1EE96A4E6}.Release|Any CPU.Build.0 = Release|Any CPU
{11644885-00A6-4158-BA59-9FF3ACD2979C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{11644885-00A6-4158-BA59-9FF3ACD2979C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{11644885-00A6-4158-BA59-9FF3ACD2979C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{11644885-00A6-4158-BA59-9FF3ACD2979C}.Release|Any CPU.Build.0 = Release|Any CPU
{3777E5B5-3018-4BEC-9A1E-2C65198312EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3777E5B5-3018-4BEC-9A1E-2C65198312EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3777E5B5-3018-4BEC-9A1E-2C65198312EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3777E5B5-3018-4BEC-9A1E-2C65198312EC}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -5,7 +5,6 @@ using WorkerWebApp;
using Microsoft.AspNetCore.Mvc;
using System.Diagnostics;
using WorkerWebApp.Models;
using PrecastConcretePlantContracts.ViewModels;
namespace WorkerWebApp.Controllers
{

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>

View File

@ -31,10 +31,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BeautySalonBusinessLogic\BeautySalonBusinessLogic.csproj" />
<ProjectReference Include="..\BeautySalonContracts\BeautySalonContracts.csproj" />
<ProjectReference Include="..\BeautySalonDatabaseImplement\BeautySalonDatabaseImplement.csproj" />
<ProjectReference Include="..\BeautySalonDataModels\BeautySalonDataModels.csproj" />
</ItemGroup>
<ItemGroup>