diff --git a/DressAtelierBusinessLogic/MailEmployee/AbstractMailEmployee.cs b/DressAtelierBusinessLogic/MailEmployee/AbstractMailEmployee.cs index 27b6e1a..75ea19f 100644 --- a/DressAtelierBusinessLogic/MailEmployee/AbstractMailEmployee.cs +++ b/DressAtelierBusinessLogic/MailEmployee/AbstractMailEmployee.cs @@ -35,7 +35,7 @@ namespace DressAtelierBusinessLogic.MailEmployee _smtpClientPort = config.SmtpClientPort; _popHost = config.PopHost; _popPort = config.PopPort; - _logger.LogDebug("Config: {login}, {password}, {clientHost}, {clientPOrt}, {popHost}, {popPort}", _mailLogin, _mailPassword, _smtpClientHost, _smtpClientPort, _popHost, _popPort); + _logger.LogDebug("Config: {login}, {password}, {clientHost}, {clientPort}, {popHost}, {popPort}", _mailLogin, _mailPassword, _smtpClientHost, _smtpClientPort, _popHost, _popPort); } public async void MailSendAsync(MailSendInfoBindingModel info) diff --git a/DressAtelierDatabaseImplement/Models/Client.cs b/DressAtelierDatabaseImplement/Models/Client.cs index 62273de..614dd17 100644 --- a/DressAtelierDatabaseImplement/Models/Client.cs +++ b/DressAtelierDatabaseImplement/Models/Client.cs @@ -35,6 +35,9 @@ namespace DressAtelierDatabaseImplement.Models [ForeignKey("ClientID")] public virtual List Orders { get; set; } = new(); + [ForeignKey("ClientID")] + public virtual List? Messages { get; set; } = new(); + public static Client? Create(ClientBindingModel? model) { if (model == null) diff --git a/DressAtelierRestApi/Program.cs b/DressAtelierRestApi/Program.cs index c0a2105..8717c40 100644 --- a/DressAtelierRestApi/Program.cs +++ b/DressAtelierRestApi/Program.cs @@ -27,7 +27,7 @@ builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddTransient(); -builder.Services.AddTransient(); +builder.Services.AddSingleton(); builder.Services.AddControllers(); // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle