LabWork07 Fixes: link from client to his messages has been implemented + RestAPI behavior of AbstractMailEmployee has been changed to Singleton.
This commit is contained in:
parent
b9fb91e4ff
commit
692e1a4799
@ -35,7 +35,7 @@ namespace DressAtelierBusinessLogic.MailEmployee
|
|||||||
_smtpClientPort = config.SmtpClientPort;
|
_smtpClientPort = config.SmtpClientPort;
|
||||||
_popHost = config.PopHost;
|
_popHost = config.PopHost;
|
||||||
_popPort = config.PopPort;
|
_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)
|
public async void MailSendAsync(MailSendInfoBindingModel info)
|
||||||
|
@ -26,6 +26,9 @@ namespace DressAtelierDatabaseImplement.Models
|
|||||||
[ForeignKey("ClientID")]
|
[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();
|
||||||
|
|
||||||
public static Client? Create(ClientBindingModel? model)
|
public static Client? Create(ClientBindingModel? model)
|
||||||
{
|
{
|
||||||
if (model == null)
|
if (model == null)
|
||||||
|
@ -27,7 +27,7 @@ builder.Services.AddTransient<IDressLogic, DressLogic>();
|
|||||||
builder.Services.AddTransient<IEmployeeLogic, EmployeeLogic>();
|
builder.Services.AddTransient<IEmployeeLogic, EmployeeLogic>();
|
||||||
builder.Services.AddTransient<IMessageInfoLogic,MessageInfoLogic>();
|
builder.Services.AddTransient<IMessageInfoLogic,MessageInfoLogic>();
|
||||||
|
|
||||||
builder.Services.AddTransient<AbstractMailEmployee,MailKitEmployee>();
|
builder.Services.AddSingleton<AbstractMailEmployee,MailKitEmployee>();
|
||||||
|
|
||||||
builder.Services.AddControllers();
|
builder.Services.AddControllers();
|
||||||
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
||||||
|
Loading…
Reference in New Issue
Block a user