EmailProfilerDispatcher hinzugefügt und EnvelopeMailService erstellt.
This commit is contained in:
parent
bc6972bcfb
commit
86bdb233c2
@ -1,11 +0,0 @@
|
|||||||
using DigitalData.Core.Contracts.Application;
|
|
||||||
using EnvelopeGenerator.Application.DTOs;
|
|
||||||
using EnvelopeGenerator.Domain.Entities;
|
|
||||||
using EnvelopeGenerator.Infrastructure.Contracts;
|
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Application.Contracts
|
|
||||||
{
|
|
||||||
public interface IEmailOutService : IBasicCRUDService<IEmailOutRepository, EmailOutDto, EmailOut, int>
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
using DigitalData.EmailProfilerDispatcher.Application.Contracts;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Contracts
|
||||||
|
{
|
||||||
|
public interface IEnvelopeMailService : IEmailOutService
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,25 +0,0 @@
|
|||||||
namespace EnvelopeGenerator.Application.DTOs
|
|
||||||
{
|
|
||||||
public record EmailOutDto(
|
|
||||||
int Guid,
|
|
||||||
int ReminderTypeId,
|
|
||||||
int SendingProfile,
|
|
||||||
int ReferenceId,
|
|
||||||
string? ReferenceString,
|
|
||||||
int? EntityId,
|
|
||||||
int WfId,
|
|
||||||
string? WfReference,
|
|
||||||
string EmailAdress,
|
|
||||||
string EmailSubj,
|
|
||||||
string EmailBody,
|
|
||||||
string? EmailAttmt1,
|
|
||||||
DateTime? EmailSent,
|
|
||||||
string? Comment,
|
|
||||||
string AddedWho,
|
|
||||||
DateTime? AddedWhen,
|
|
||||||
string? ChangedWho,
|
|
||||||
DateTime? ChangedWhen,
|
|
||||||
DateTime? ErrorTimestamp,
|
|
||||||
string? ErrorMsg
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -28,6 +28,15 @@
|
|||||||
<Reference Include="DigitalData.Core.Infrastructure">
|
<Reference Include="DigitalData.Core.Infrastructure">
|
||||||
<HintPath>..\..\WebUserManager\DigitalData.UserManager.Application\bin\Debug\net7.0\DigitalData.Core.Infrastructure.dll</HintPath>
|
<HintPath>..\..\WebUserManager\DigitalData.UserManager.Application\bin\Debug\net7.0\DigitalData.Core.Infrastructure.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="DigitalData.EmailProfilerDispatcher.Application">
|
||||||
|
<HintPath>..\..\EmailProfilerDispatcher\DigitalData.EmailProfilerDispatcher.Application\bin\Debug\net7.0\DigitalData.EmailProfilerDispatcher.Application.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="DigitalData.EmailProfilerDispatcher.Domain">
|
||||||
|
<HintPath>..\..\EmailProfilerDispatcher\DigitalData.EmailProfilerDispatcher.Application\bin\Debug\net7.0\DigitalData.EmailProfilerDispatcher.Domain.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="DigitalData.EmailProfilerDispatcher.Infrastructure">
|
||||||
|
<HintPath>..\..\EmailProfilerDispatcher\DigitalData.EmailProfilerDispatcher.Application\bin\Debug\net7.0\DigitalData.EmailProfilerDispatcher.Infrastructure.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="DigitalData.UserManager.Application">
|
<Reference Include="DigitalData.UserManager.Application">
|
||||||
<HintPath>..\..\WebUserManager\DigitalData.UserManager.Application\bin\Debug\net7.0\DigitalData.UserManager.Application.dll</HintPath>
|
<HintPath>..\..\WebUserManager\DigitalData.UserManager.Application\bin\Debug\net7.0\DigitalData.UserManager.Application.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
|||||||
@ -23,7 +23,6 @@ namespace EnvelopeGenerator.Application.MappingProfiles
|
|||||||
CreateMap<EnvelopeType, EnvelopeTypeDto>();
|
CreateMap<EnvelopeType, EnvelopeTypeDto>();
|
||||||
CreateMap<Receiver, ReceiverDto>();
|
CreateMap<Receiver, ReceiverDto>();
|
||||||
CreateMap<UserReceiver, UserReceiverDto>();
|
CreateMap<UserReceiver, UserReceiverDto>();
|
||||||
CreateMap<EmailOut, EmailOutDto>();
|
|
||||||
|
|
||||||
// DTO to Entity mappings
|
// DTO to Entity mappings
|
||||||
CreateMap<ConfigDto, Config>();
|
CreateMap<ConfigDto, Config>();
|
||||||
@ -39,7 +38,6 @@ namespace EnvelopeGenerator.Application.MappingProfiles
|
|||||||
CreateMap<EnvelopeTypeDto, EnvelopeType>();
|
CreateMap<EnvelopeTypeDto, EnvelopeType>();
|
||||||
CreateMap<ReceiverDto, Receiver>();
|
CreateMap<ReceiverDto, Receiver>();
|
||||||
CreateMap<UserReceiverDto, UserReceiver>();
|
CreateMap<UserReceiverDto, UserReceiver>();
|
||||||
CreateMap<EmailOutDto, EmailOut>();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,18 +0,0 @@
|
|||||||
using AutoMapper;
|
|
||||||
using DigitalData.Core.Application;
|
|
||||||
using EnvelopeGenerator.Application.Contracts;
|
|
||||||
using EnvelopeGenerator.Application.DTOs;
|
|
||||||
using EnvelopeGenerator.Application.Resources;
|
|
||||||
using EnvelopeGenerator.Domain.Entities;
|
|
||||||
using EnvelopeGenerator.Infrastructure.Contracts;
|
|
||||||
using Microsoft.Extensions.Localization;
|
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Application.Services
|
|
||||||
{
|
|
||||||
public class EmailOutService : BasicCRUDService<IEmailOutRepository, EmailOutDto, EmailOut, int>, IEmailOutService
|
|
||||||
{
|
|
||||||
public EmailOutService(IEmailOutRepository repository, IStringLocalizer<Resource> localizer, IMapper mapper) : base(repository, localizer, mapper)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
using AutoMapper;
|
||||||
|
using DigitalData.EmailProfilerDispatcher.Application.Services;
|
||||||
|
using DigitalData.EmailProfilerDispatcher.Infrastructure.Contracts;
|
||||||
|
using DigitalData.UserManager.Application;
|
||||||
|
using EnvelopeGenerator.Application.Contracts;
|
||||||
|
using Microsoft.Extensions.Localization;
|
||||||
|
namespace EnvelopeGenerator.Application.Services
|
||||||
|
{
|
||||||
|
public class EnvelopeMailService : EmailOutService<Resource>, IEnvelopeMailService
|
||||||
|
{
|
||||||
|
public EnvelopeMailService(IEmailOutRepository repository, IStringLocalizer<Resource> localizer, IMapper mapper, IEmailTemplateService tempService) : base(repository, localizer, mapper)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,89 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Domain.Entities
|
|
||||||
{
|
|
||||||
[Table("TBEMLP_EMAIL_OUT", Schema = "dbo")]
|
|
||||||
public class EmailOut
|
|
||||||
{
|
|
||||||
[Key]
|
|
||||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
||||||
[Column("GUID")]
|
|
||||||
public int Id { get; set; }
|
|
||||||
|
|
||||||
[Required]
|
|
||||||
[Column("REMINDER_TYPE_ID")]
|
|
||||||
public int ReminderTypeId { get; set; } = 1; // Default value
|
|
||||||
|
|
||||||
[Required]
|
|
||||||
[Column("SENDING_PROFILE")]
|
|
||||||
public int SendingProfile { get; set; }
|
|
||||||
|
|
||||||
[Required]
|
|
||||||
[Column("REFERENCE_ID")]
|
|
||||||
public int ReferenceId { get; set; }
|
|
||||||
|
|
||||||
[StringLength(200)]
|
|
||||||
[Column("REFERENCE_STRING")]
|
|
||||||
public string ReferenceString { get; set; }
|
|
||||||
|
|
||||||
[Column("ENTITY_ID")]
|
|
||||||
public int? EntityId { get; set; }
|
|
||||||
|
|
||||||
[Required]
|
|
||||||
[Column("WF_ID")]
|
|
||||||
public int WfId { get; set; }
|
|
||||||
|
|
||||||
[StringLength(200)]
|
|
||||||
[Column("WF_REFERENCE")]
|
|
||||||
public string WfReference { get; set; }
|
|
||||||
|
|
||||||
[Required]
|
|
||||||
[StringLength(1000)]
|
|
||||||
[Column("EMAIL_ADRESS")]
|
|
||||||
public string EmailAdress { get; set; }
|
|
||||||
|
|
||||||
[Required]
|
|
||||||
[StringLength(500)]
|
|
||||||
[Column("EMAIL_SUBJ")]
|
|
||||||
public string EmailSubj { get; set; }
|
|
||||||
|
|
||||||
[Required]
|
|
||||||
[Column("EMAIL_BODY")]
|
|
||||||
public string EmailBody { get; set; }
|
|
||||||
|
|
||||||
[StringLength(512)]
|
|
||||||
[Column("EMAIL_ATTMT1")]
|
|
||||||
public string EmailAttmt1 { get; set; }
|
|
||||||
|
|
||||||
[Column("EMAIL_SENT")]
|
|
||||||
public DateTime? EmailSent { get; set; }
|
|
||||||
|
|
||||||
[StringLength(500)]
|
|
||||||
[Column("COMMENT")]
|
|
||||||
public string Comment { get; set; }
|
|
||||||
|
|
||||||
[Required]
|
|
||||||
[StringLength(50)]
|
|
||||||
[Column("ADDED_WHO")]
|
|
||||||
public string AddedWho { get; set; } = "DEFAULT"; // Default value
|
|
||||||
|
|
||||||
[Column("ADDED_WHEN")]
|
|
||||||
public DateTime? AddedWhen { get; set; } = DateTime.Now; // Default value
|
|
||||||
|
|
||||||
[StringLength(50)]
|
|
||||||
[Column("CHANGED_WHO")]
|
|
||||||
public string ChangedWho { get; set; }
|
|
||||||
|
|
||||||
[Column("CHANGED_WHEN")]
|
|
||||||
public DateTime? ChangedWhen { get; set; }
|
|
||||||
|
|
||||||
[Column("ERROR_TIMESTAMP")]
|
|
||||||
public DateTime? ErrorTimestamp { get; set; }
|
|
||||||
|
|
||||||
[StringLength(900)]
|
|
||||||
[Column("ERROR_MSG")]
|
|
||||||
public string ErrorMsg { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
using DigitalData.Core.Contracts.Infrastructure;
|
|
||||||
using EnvelopeGenerator.Domain.Entities;
|
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Infrastructure.Contracts
|
|
||||||
{
|
|
||||||
public interface IEmailOutRepository : ICRUDRepository<EmailOut, int>
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,14 +0,0 @@
|
|||||||
using DigitalData.Core.Infrastructure;
|
|
||||||
using DigitalData.UserManager.Infrastructure.Repositories;
|
|
||||||
using EnvelopeGenerator.Domain.Entities;
|
|
||||||
using EnvelopeGenerator.Infrastructure.Contracts;
|
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Infrastructure.Repositories
|
|
||||||
{
|
|
||||||
public class EmailOutRepository : CRUDRepository<EmailOut, int, EGDbContext>, IEmailOutRepository
|
|
||||||
{
|
|
||||||
public EmailOutRepository(EGDbContext dbContext) : base(dbContext)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -62,6 +62,15 @@
|
|||||||
<Reference Include="DigitalData.Core.Infrastructure">
|
<Reference Include="DigitalData.Core.Infrastructure">
|
||||||
<HintPath>..\..\WebCoreModules\DigitalData.Core.Infrastructure\bin\Debug\net7.0\DigitalData.Core.Infrastructure.dll</HintPath>
|
<HintPath>..\..\WebCoreModules\DigitalData.Core.Infrastructure\bin\Debug\net7.0\DigitalData.Core.Infrastructure.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="DigitalData.EmailProfilerDispatcher.Application">
|
||||||
|
<HintPath>..\..\EmailProfilerDispatcher\DigitalData.EmailProfilerDispatcher.Application\bin\Debug\net7.0\DigitalData.EmailProfilerDispatcher.Application.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="DigitalData.EmailProfilerDispatcher.Domain">
|
||||||
|
<HintPath>..\..\EmailProfilerDispatcher\DigitalData.EmailProfilerDispatcher.Application\bin\Debug\net7.0\DigitalData.EmailProfilerDispatcher.Domain.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="DigitalData.EmailProfilerDispatcher.Infrastructure">
|
||||||
|
<HintPath>..\..\EmailProfilerDispatcher\DigitalData.EmailProfilerDispatcher.Application\bin\Debug\net7.0\DigitalData.EmailProfilerDispatcher.Infrastructure.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="DigitalData.Modules.Base">
|
<Reference Include="DigitalData.Modules.Base">
|
||||||
<HintPath>..\..\DDModules\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath>
|
<HintPath>..\..\DDModules\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
|||||||
@ -17,6 +17,8 @@ using DigitalData.Core.DTO;
|
|||||||
using System.Text.Encodings.Web;
|
using System.Text.Encodings.Web;
|
||||||
using Ganss.Xss;
|
using Ganss.Xss;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
|
using DigitalData.EmailProfilerDispatcher.Application;
|
||||||
|
using DigitalData.UserManager.Application;
|
||||||
|
|
||||||
var logger = LogManager.Setup().LoadConfigurationFromAppSettings().GetCurrentClassLogger();
|
var logger = LogManager.Setup().LoadConfigurationFromAppSettings().GetCurrentClassLogger();
|
||||||
logger.Info("Logging initialized!");
|
logger.Info("Logging initialized!");
|
||||||
@ -89,7 +91,6 @@ try
|
|||||||
builder.Services.AddScoped<IEnvelopeTypeRepository, EnvelopeTypeRepository>();
|
builder.Services.AddScoped<IEnvelopeTypeRepository, EnvelopeTypeRepository>();
|
||||||
builder.Services.AddScoped<IReceiverRepository, ReceiverRepository>();
|
builder.Services.AddScoped<IReceiverRepository, ReceiverRepository>();
|
||||||
builder.Services.AddScoped<IUserReceiverRepository, UserReceiverRepository>();
|
builder.Services.AddScoped<IUserReceiverRepository, UserReceiverRepository>();
|
||||||
builder.Services.AddScoped<IEmailOutRepository, EmailOutRepository>();
|
|
||||||
builder.Services.AddScoped<IConfigService, ConfigService>();
|
builder.Services.AddScoped<IConfigService, ConfigService>();
|
||||||
builder.Services.AddScoped<IDocumentReceiverElementService, DocumentReceiverElementService>();
|
builder.Services.AddScoped<IDocumentReceiverElementService, DocumentReceiverElementService>();
|
||||||
builder.Services.AddScoped<IEnvelopeDocumentService, EnvelopeDocumentService>();
|
builder.Services.AddScoped<IEnvelopeDocumentService, EnvelopeDocumentService>();
|
||||||
@ -103,7 +104,6 @@ try
|
|||||||
builder.Services.AddScoped<IEnvelopeTypeService, EnvelopeTypeService>();
|
builder.Services.AddScoped<IEnvelopeTypeService, EnvelopeTypeService>();
|
||||||
builder.Services.AddScoped<IReceiverService, ReceiverService>();
|
builder.Services.AddScoped<IReceiverService, ReceiverService>();
|
||||||
builder.Services.AddScoped<IUserReceiverService, UserReceiverService>();
|
builder.Services.AddScoped<IUserReceiverService, UserReceiverService>();
|
||||||
builder.Services.AddScoped<IEmailOutService, EmailOutService>();
|
|
||||||
|
|
||||||
//Auto mapping profiles
|
//Auto mapping profiles
|
||||||
builder.Services.AddAutoMapper(typeof(BasicDtoMappingProfile).Assembly);
|
builder.Services.AddAutoMapper(typeof(BasicDtoMappingProfile).Assembly);
|
||||||
@ -170,6 +170,10 @@ try
|
|||||||
builder.Services.Configure<Cultures>(builder.Configuration.GetSection("Cultures"));
|
builder.Services.Configure<Cultures>(builder.Configuration.GetSection("Cultures"));
|
||||||
builder.Services.AddSingleton(sp => sp.GetRequiredService<IOptions<Cultures>>().Value);
|
builder.Services.AddSingleton(sp => sp.GetRequiredService<IOptions<Cultures>>().Value);
|
||||||
|
|
||||||
|
// Register mail services
|
||||||
|
builder.Services.AddScoped<IEnvelopeMailService, EnvelopeMailService>();
|
||||||
|
builder.Services.AddDispatcher<EGDbContext, Resource>();
|
||||||
|
|
||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
|
|
||||||
// Configure the HTTP request pipeline.
|
// Configure the HTTP request pipeline.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user