feat: Implementierung von Repositories, Services und DTOs für alle Entitäten
- Notwendige Repositories, Services und DTOs für jede Entität, die SQL-Tabellen entspricht, unter Verwendung der WebCore-Bibliothek erstellt. - Mapping-Profile für effiziente Datentransformation definiert. - Dependency Injections für Repositories und Services als scoped konfiguriert, um eine korrekte Lebenszyklusverwaltung zu gewährleisten.
This commit is contained in:
parent
b65766ce24
commit
b8d4abb7b2
@ -0,0 +1,11 @@
|
|||||||
|
using DigitalData.Core.Contracts.Application;
|
||||||
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using EnvelopeGenerator.Infrastructure.Contracts;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Contracts
|
||||||
|
{
|
||||||
|
public interface IDocumentReceiverElementService : IBasicCRUDService<IDocumentReceiverElementRepository, DocumentReceiverElementDto, DocumentReceiverElement, int>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
using DigitalData.Core.Contracts.Application;
|
||||||
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using EnvelopeGenerator.Infrastructure.Contracts;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Contracts
|
||||||
|
{
|
||||||
|
public interface IDocumentStatusService : IBasicCRUDService<IDocumentStatusRepository, DocumentStatusDto, DocumentStatus, int>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
using DigitalData.Core.Contracts.Application;
|
||||||
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using EnvelopeGenerator.Infrastructure.Contracts;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Contracts
|
||||||
|
{
|
||||||
|
public interface IEmailTemplateService : IBasicCRUDService<IEmailTemplateRepository, EmailTemplateDto, EmailTemplate, int>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
using DigitalData.Core.Contracts.Application;
|
||||||
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using EnvelopeGenerator.Infrastructure.Contracts;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Contracts
|
||||||
|
{
|
||||||
|
public interface IEnvelopeCertificateService : IBasicCRUDService<IEnvelopeCertificateRepository, EnvelopeCertificateDto, EnvelopeCertificate, int>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
using DigitalData.Core.Contracts.Application;
|
||||||
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using EnvelopeGenerator.Infrastructure.Contracts;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Contracts
|
||||||
|
{
|
||||||
|
public interface IEnvelopeHistoryService : IBasicCRUDService<IEnvelopeHistoryRepository, EnvelopeHistoryDto, EnvelopeHistory, long>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
using DigitalData.Core.Contracts.Application;
|
||||||
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using EnvelopeGenerator.Infrastructure.Contracts;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Contracts
|
||||||
|
{
|
||||||
|
public interface IEnvelopeReceiverService : IBasicCRUDService<IEnvelopeReceiverRepository, EnvelopeReceiverDto, EnvelopeReceiver, int>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
11
EnvelopeGenerator.Application/Contracts/IEnvelopeService.cs
Normal file
11
EnvelopeGenerator.Application/Contracts/IEnvelopeService.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
using DigitalData.Core.Contracts.Application;
|
||||||
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using EnvelopeGenerator.Infrastructure.Contracts;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Contracts
|
||||||
|
{
|
||||||
|
public interface IEnvelopeService : IBasicCRUDService<IEnvelopeRepository, EnvelopeDto, Envelope, int>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
using DigitalData.Core.Contracts.Application;
|
||||||
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using EnvelopeGenerator.Infrastructure.Contracts;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Contracts
|
||||||
|
{
|
||||||
|
public interface IEnvelopeTypeService : IBasicCRUDService<IEnvelopeTypeRepository, EnvelopeTypeDto, EnvelopeType, int>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
11
EnvelopeGenerator.Application/Contracts/IReceiverService.cs
Normal file
11
EnvelopeGenerator.Application/Contracts/IReceiverService.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
using DigitalData.Core.Contracts.Application;
|
||||||
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using EnvelopeGenerator.Infrastructure.Contracts;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Contracts
|
||||||
|
{
|
||||||
|
public interface IReceiverService : IBasicCRUDService<IReceiverRepository, ReceiverDto, Receiver, int>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
using DigitalData.Core.Contracts.Application;
|
||||||
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using EnvelopeGenerator.Infrastructure.Contracts;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Contracts
|
||||||
|
{
|
||||||
|
public interface IUserReceiverService : IBasicCRUDService<IUserReceiverRepository, UserReceiverDto, UserReceiver, int>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,15 +1,13 @@
|
|||||||
namespace EnvelopeGenerator.Application.DTOs
|
namespace EnvelopeGenerator.Application.DTOs
|
||||||
{
|
{
|
||||||
public record ConfigDto
|
public record ConfigDto(
|
||||||
{
|
string DocumentPath,
|
||||||
public string DocumentPath { get; init; }
|
int SendingProfile,
|
||||||
public int SendingProfile { get; init; }
|
string SignatureHost,
|
||||||
public string SignatureHost { get; init; }
|
string ExternalProgramName,
|
||||||
public string ExternalProgramName { get; init; }
|
string ExportPath,
|
||||||
public string ExportPath { get; init; }
|
string DocumentPathDmz,
|
||||||
public string DocumentPathDmz { get; init; }
|
string ExportPathDmz,
|
||||||
public string ExportPathDmz { get; init; }
|
string SignedMailPath,
|
||||||
public string SignedMailPath { get; init; }
|
string DocumentPathMoveAftsend);
|
||||||
public string DocumentPathMoveAftsend { get; init; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
namespace EnvelopeGenerator.Application.DTOs
|
||||||
|
{
|
||||||
|
public record DocumentReceiverElementDto(
|
||||||
|
int Guid,
|
||||||
|
int DocumentId,
|
||||||
|
int ReceiverId,
|
||||||
|
int ElementType,
|
||||||
|
float PositionX,
|
||||||
|
float PositionY,
|
||||||
|
float Width,
|
||||||
|
float Height,
|
||||||
|
int Page,
|
||||||
|
bool Required,
|
||||||
|
string Tooltip,
|
||||||
|
bool ReadOnly,
|
||||||
|
int AnnotationIndex,
|
||||||
|
DateTime AddedWhen,
|
||||||
|
DateTime? ChangedWhen,
|
||||||
|
EnvelopeDocumentDto? Document,
|
||||||
|
EnvelopeReceiverDto? Receiver);
|
||||||
|
}
|
||||||
12
EnvelopeGenerator.Application/DTOs/DocumentStatusDto.cs
Normal file
12
EnvelopeGenerator.Application/DTOs/DocumentStatusDto.cs
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
namespace EnvelopeGenerator.Application.DTOs
|
||||||
|
{
|
||||||
|
public record DocumentStatusDto(
|
||||||
|
int Guid,
|
||||||
|
int EnvelopeId,
|
||||||
|
int ReceiverId,
|
||||||
|
int Status,
|
||||||
|
DateTime? StatusChangedWhen,
|
||||||
|
string Value,
|
||||||
|
DateTime AddedWhen,
|
||||||
|
DateTime? ChangedWhen);
|
||||||
|
}
|
||||||
8
EnvelopeGenerator.Application/DTOs/EmailTemplateDto.cs
Normal file
8
EnvelopeGenerator.Application/DTOs/EmailTemplateDto.cs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
namespace EnvelopeGenerator.Application.DTOs
|
||||||
|
{
|
||||||
|
public record EmailTemplateDto(
|
||||||
|
int Guid,
|
||||||
|
string Name,
|
||||||
|
string Body,
|
||||||
|
string Subject);
|
||||||
|
}
|
||||||
12
EnvelopeGenerator.Application/DTOs/EnvelopeCertificateDto.cs
Normal file
12
EnvelopeGenerator.Application/DTOs/EnvelopeCertificateDto.cs
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
namespace EnvelopeGenerator.Application.DTOs
|
||||||
|
{
|
||||||
|
public record EnvelopeCertificateDto(
|
||||||
|
int Guid,
|
||||||
|
int EnvelopeId,
|
||||||
|
string EnvelopeUuid,
|
||||||
|
string EnvelopeSubject,
|
||||||
|
int CreatorId,
|
||||||
|
string CreatorName,
|
||||||
|
string CreatorEmail,
|
||||||
|
int EnvelopeStatus);
|
||||||
|
}
|
||||||
27
EnvelopeGenerator.Application/DTOs/EnvelopeDto.cs
Normal file
27
EnvelopeGenerator.Application/DTOs/EnvelopeDto.cs
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
namespace EnvelopeGenerator.Application.DTOs
|
||||||
|
{
|
||||||
|
public record EnvelopeDto(
|
||||||
|
int Guid,
|
||||||
|
int UserId,
|
||||||
|
int Status,
|
||||||
|
string EnvelopeUuid,
|
||||||
|
string Message,
|
||||||
|
DateTime? ExpiresWhen,
|
||||||
|
DateTime? ExpiresWarningWhen,
|
||||||
|
DateTime AddedWhen,
|
||||||
|
DateTime? ChangedWhen,
|
||||||
|
string Title,
|
||||||
|
int? ContractType,
|
||||||
|
string Language,
|
||||||
|
bool? SendReminderEmails,
|
||||||
|
int? FirstReminderDays,
|
||||||
|
int? ReminderIntervalDays,
|
||||||
|
int? EnvelopeType,
|
||||||
|
int? CertificationType,
|
||||||
|
bool? UseAccessCode,
|
||||||
|
int? FinalEmailToCreator,
|
||||||
|
int? FinalEmailToReceivers,
|
||||||
|
int? ExpiresWhenDays,
|
||||||
|
int? ExpiresWarningWhenDays,
|
||||||
|
bool DmzMoved);
|
||||||
|
}
|
||||||
10
EnvelopeGenerator.Application/DTOs/EnvelopeHistoryDto.cs
Normal file
10
EnvelopeGenerator.Application/DTOs/EnvelopeHistoryDto.cs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
namespace EnvelopeGenerator.Application.DTOs
|
||||||
|
{
|
||||||
|
public record EnvelopeHistoryDto(
|
||||||
|
long Guid,
|
||||||
|
int EnvelopeId,
|
||||||
|
string UserReference,
|
||||||
|
int Status,
|
||||||
|
DateTime AddedWhen,
|
||||||
|
DateTime? ActionDate);
|
||||||
|
}
|
||||||
14
EnvelopeGenerator.Application/DTOs/EnvelopeReceiverDto.cs
Normal file
14
EnvelopeGenerator.Application/DTOs/EnvelopeReceiverDto.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
namespace EnvelopeGenerator.Application.DTOs
|
||||||
|
{
|
||||||
|
public record EnvelopeReceiverDto(
|
||||||
|
int EnvelopeId,
|
||||||
|
int ReceiverId,
|
||||||
|
int Sequence,
|
||||||
|
string Name,
|
||||||
|
string JobTitle,
|
||||||
|
string CompanyName,
|
||||||
|
string PrivateMessage,
|
||||||
|
string AccessCode,
|
||||||
|
DateTime AddedWhen,
|
||||||
|
DateTime? ChangedWhen);
|
||||||
|
}
|
||||||
19
EnvelopeGenerator.Application/DTOs/EnvelopeTypeDto.cs
Normal file
19
EnvelopeGenerator.Application/DTOs/EnvelopeTypeDto.cs
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
namespace EnvelopeGenerator.Application.DTOs
|
||||||
|
{
|
||||||
|
public record EnvelopeTypeDto(
|
||||||
|
int Guid,
|
||||||
|
string Title,
|
||||||
|
string Language,
|
||||||
|
int? ExpiresDays,
|
||||||
|
int? CertificationType,
|
||||||
|
bool? UseAccessCode,
|
||||||
|
int? FinalEmailToCreator,
|
||||||
|
int? FinalEmailToReceivers,
|
||||||
|
DateTime AddedWhen,
|
||||||
|
DateTime? ChangedWhen,
|
||||||
|
int? ExpiresWarningDays,
|
||||||
|
bool? SendReminderEmails,
|
||||||
|
int? FirstReminderDays,
|
||||||
|
int? ReminderIntervalDays,
|
||||||
|
int? ContractType);
|
||||||
|
}
|
||||||
8
EnvelopeGenerator.Application/DTOs/ReceiverDto.cs
Normal file
8
EnvelopeGenerator.Application/DTOs/ReceiverDto.cs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
namespace EnvelopeGenerator.Application.DTOs
|
||||||
|
{
|
||||||
|
public record ReceiverDto(
|
||||||
|
int Guid,
|
||||||
|
string EmailAddress,
|
||||||
|
string Signature,
|
||||||
|
DateTime AddedWhen);
|
||||||
|
}
|
||||||
11
EnvelopeGenerator.Application/DTOs/UserReceiverDto.cs
Normal file
11
EnvelopeGenerator.Application/DTOs/UserReceiverDto.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
namespace EnvelopeGenerator.Application.DTOs
|
||||||
|
{
|
||||||
|
public record UserReceiverDto(
|
||||||
|
int Guid,
|
||||||
|
int UserId,
|
||||||
|
int ReceiverId,
|
||||||
|
string Name,
|
||||||
|
string CompanyName,
|
||||||
|
string JobTitle,
|
||||||
|
DateTime AddedWhen);
|
||||||
|
}
|
||||||
@ -8,11 +8,33 @@ namespace EnvelopeGenerator.Application.MappingProfiles
|
|||||||
{
|
{
|
||||||
public BasicDtoMappingProfile()
|
public BasicDtoMappingProfile()
|
||||||
{
|
{
|
||||||
|
// Entity to DTO mappings
|
||||||
CreateMap<Config, ConfigDto>();
|
CreateMap<Config, ConfigDto>();
|
||||||
|
CreateMap<DocumentReceiverElement, DocumentReceiverElementDto>();
|
||||||
|
CreateMap<DocumentStatus, DocumentStatusDto>();
|
||||||
|
CreateMap<EmailTemplate, EmailTemplateDto>();
|
||||||
|
CreateMap<Envelope, EnvelopeDto>();
|
||||||
|
CreateMap<EnvelopeCertificate, EnvelopeCertificateDto>();
|
||||||
CreateMap<EnvelopeDocument, EnvelopeDocumentDto>();
|
CreateMap<EnvelopeDocument, EnvelopeDocumentDto>();
|
||||||
|
CreateMap<EnvelopeHistory, EnvelopeHistoryDto>();
|
||||||
|
CreateMap<EnvelopeReceiver, EnvelopeReceiverDto>();
|
||||||
|
CreateMap<EnvelopeType, EnvelopeTypeDto>();
|
||||||
|
CreateMap<Receiver, ReceiverDto>();
|
||||||
|
CreateMap<UserReceiver, UserReceiverDto>();
|
||||||
|
|
||||||
|
// DTO to Entity mappings
|
||||||
CreateMap<ConfigDto, Config>();
|
CreateMap<ConfigDto, Config>();
|
||||||
|
CreateMap<DocumentReceiverElementDto, DocumentReceiverElement>();
|
||||||
|
CreateMap<DocumentStatusDto, DocumentStatus>();
|
||||||
|
CreateMap<EmailTemplateDto, EmailTemplate>();
|
||||||
|
CreateMap<EnvelopeDto, Envelope>();
|
||||||
|
CreateMap<EnvelopeCertificateDto, EnvelopeCertificate>();
|
||||||
CreateMap<EnvelopeDocumentDto, EnvelopeDocument>();
|
CreateMap<EnvelopeDocumentDto, EnvelopeDocument>();
|
||||||
|
CreateMap<EnvelopeHistoryDto, EnvelopeHistory>();
|
||||||
|
CreateMap<EnvelopeReceiverDto, EnvelopeReceiver>();
|
||||||
|
CreateMap<EnvelopeTypeDto, EnvelopeType>();
|
||||||
|
CreateMap<ReceiverDto, Receiver>();
|
||||||
|
CreateMap<UserReceiverDto, UserReceiver>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
using AutoMapper;
|
||||||
|
using DigitalData.Core.Application;
|
||||||
|
using DigitalData.Core.Contracts.CultureServices;
|
||||||
|
using EnvelopeGenerator.Application.Contracts;
|
||||||
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using EnvelopeGenerator.Infrastructure.Contracts;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Services
|
||||||
|
{
|
||||||
|
public class DocumentReceiverElementService : BasicCRUDService<IDocumentReceiverElementRepository, DocumentReceiverElementDto, DocumentReceiverElement, int>, IDocumentReceiverElementService
|
||||||
|
{
|
||||||
|
public DocumentReceiverElementService(IDocumentReceiverElementRepository repository, IKeyTranslationService translationService, IMapper mapper)
|
||||||
|
: base(repository, translationService, mapper)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
using AutoMapper;
|
||||||
|
using DigitalData.Core.Application;
|
||||||
|
using DigitalData.Core.Contracts.CultureServices;
|
||||||
|
using EnvelopeGenerator.Application.Contracts;
|
||||||
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using EnvelopeGenerator.Infrastructure.Contracts;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Services
|
||||||
|
{
|
||||||
|
public class DocumentStatusService : BasicCRUDService<IDocumentStatusRepository, DocumentStatusDto, DocumentStatus, int>, IDocumentStatusService
|
||||||
|
{
|
||||||
|
public DocumentStatusService(IDocumentStatusRepository repository, IKeyTranslationService translationService, IMapper mapper)
|
||||||
|
: base(repository, translationService, mapper)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
using AutoMapper;
|
||||||
|
using DigitalData.Core.Application;
|
||||||
|
using DigitalData.Core.Contracts.CultureServices;
|
||||||
|
using EnvelopeGenerator.Application.Contracts;
|
||||||
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using EnvelopeGenerator.Infrastructure.Contracts;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Services
|
||||||
|
{
|
||||||
|
public class EmailTemplateService : BasicCRUDService<IEmailTemplateRepository, EmailTemplateDto, EmailTemplate, int>, IEmailTemplateService
|
||||||
|
{
|
||||||
|
public EmailTemplateService(IEmailTemplateRepository repository, IKeyTranslationService translationService, IMapper mapper)
|
||||||
|
: base(repository, translationService, mapper)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
using AutoMapper;
|
||||||
|
using DigitalData.Core.Application;
|
||||||
|
using DigitalData.Core.Contracts.CultureServices;
|
||||||
|
using EnvelopeGenerator.Application.Contracts;
|
||||||
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using EnvelopeGenerator.Infrastructure.Contracts;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Services
|
||||||
|
{
|
||||||
|
public class EnvelopeCertificateService : BasicCRUDService<IEnvelopeCertificateRepository, EnvelopeCertificateDto, EnvelopeCertificate, int>, IEnvelopeCertificateService
|
||||||
|
{
|
||||||
|
public EnvelopeCertificateService(IEnvelopeCertificateRepository repository, IKeyTranslationService translationService, IMapper mapper)
|
||||||
|
: base(repository, translationService, mapper)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
using AutoMapper;
|
||||||
|
using DigitalData.Core.Application;
|
||||||
|
using DigitalData.Core.Contracts.CultureServices;
|
||||||
|
using EnvelopeGenerator.Application.Contracts;
|
||||||
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using EnvelopeGenerator.Infrastructure.Contracts;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Services
|
||||||
|
{
|
||||||
|
public class EnvelopeHistoryService : BasicCRUDService<IEnvelopeHistoryRepository, EnvelopeHistoryDto, EnvelopeHistory, long>, IEnvelopeHistoryService
|
||||||
|
{
|
||||||
|
public EnvelopeHistoryService(IEnvelopeHistoryRepository repository, IKeyTranslationService translationService, IMapper mapper)
|
||||||
|
: base(repository, translationService, mapper)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
using AutoMapper;
|
||||||
|
using DigitalData.Core.Application;
|
||||||
|
using DigitalData.Core.Contracts.CultureServices;
|
||||||
|
using EnvelopeGenerator.Application.Contracts;
|
||||||
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using EnvelopeGenerator.Infrastructure.Contracts;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Services
|
||||||
|
{
|
||||||
|
public class EnvelopeReceiverService : BasicCRUDService<IEnvelopeReceiverRepository, EnvelopeReceiverDto, EnvelopeReceiver, int>, IEnvelopeReceiverService
|
||||||
|
{
|
||||||
|
public EnvelopeReceiverService(IEnvelopeReceiverRepository repository, IKeyTranslationService translationService, IMapper mapper)
|
||||||
|
: base(repository, translationService, mapper)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
18
EnvelopeGenerator.Application/Services/EnvelopeService.cs
Normal file
18
EnvelopeGenerator.Application/Services/EnvelopeService.cs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
using AutoMapper;
|
||||||
|
using DigitalData.Core.Application;
|
||||||
|
using DigitalData.Core.Contracts.CultureServices;
|
||||||
|
using EnvelopeGenerator.Application.Contracts;
|
||||||
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using EnvelopeGenerator.Infrastructure.Contracts;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Services
|
||||||
|
{
|
||||||
|
public class EnvelopeService : BasicCRUDService<IEnvelopeRepository, EnvelopeDto, Envelope, int>, IEnvelopeService
|
||||||
|
{
|
||||||
|
public EnvelopeService(IEnvelopeRepository repository, IKeyTranslationService translationService, IMapper mapper)
|
||||||
|
: base(repository, translationService, mapper)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
using AutoMapper;
|
||||||
|
using DigitalData.Core.Application;
|
||||||
|
using DigitalData.Core.Contracts.CultureServices;
|
||||||
|
using EnvelopeGenerator.Application.Contracts;
|
||||||
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using EnvelopeGenerator.Infrastructure.Contracts;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Services
|
||||||
|
{
|
||||||
|
public class EnvelopeTypeService : BasicCRUDService<IEnvelopeTypeRepository, EnvelopeTypeDto, EnvelopeType, int>, IEnvelopeTypeService
|
||||||
|
{
|
||||||
|
public EnvelopeTypeService(IEnvelopeTypeRepository repository, IKeyTranslationService translationService, IMapper mapper)
|
||||||
|
: base(repository, translationService, mapper)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
18
EnvelopeGenerator.Application/Services/ReceiverService.cs
Normal file
18
EnvelopeGenerator.Application/Services/ReceiverService.cs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
using AutoMapper;
|
||||||
|
using DigitalData.Core.Application;
|
||||||
|
using DigitalData.Core.Contracts.CultureServices;
|
||||||
|
using EnvelopeGenerator.Application.Contracts;
|
||||||
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using EnvelopeGenerator.Infrastructure.Contracts;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Services
|
||||||
|
{
|
||||||
|
public class ReceiverService : BasicCRUDService<IReceiverRepository, ReceiverDto, Receiver, int>, IReceiverService
|
||||||
|
{
|
||||||
|
public ReceiverService(IReceiverRepository repository, IKeyTranslationService translationService, IMapper mapper)
|
||||||
|
: base(repository, translationService, mapper)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
using AutoMapper;
|
||||||
|
using DigitalData.Core.Application;
|
||||||
|
using DigitalData.Core.Contracts.CultureServices;
|
||||||
|
using EnvelopeGenerator.Application.Contracts;
|
||||||
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using EnvelopeGenerator.Infrastructure.Contracts;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Services
|
||||||
|
{
|
||||||
|
public class UserReceiverService : BasicCRUDService<IUserReceiverRepository, UserReceiverDto, UserReceiver, int>, IUserReceiverService
|
||||||
|
{
|
||||||
|
public UserReceiverService(IUserReceiverRepository repository, IKeyTranslationService translationService, IMapper mapper)
|
||||||
|
: base(repository, translationService, mapper)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -77,9 +77,9 @@ namespace EnvelopeGenerator.Domain.Entities
|
|||||||
public DateTime? ChangedWhen { get; set; }
|
public DateTime? ChangedWhen { get; set; }
|
||||||
|
|
||||||
[ForeignKey("DocumentId")]
|
[ForeignKey("DocumentId")]
|
||||||
public virtual Document Document { get; set; }
|
public virtual EnvelopeDocument? Document { get; set; }
|
||||||
|
|
||||||
[ForeignKey("ReceiverId")]
|
[ForeignKey("ReceiverId")]
|
||||||
public virtual Receiver Receiver { get; set; }
|
public virtual EnvelopeReceiver? Receiver { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,7 +1,5 @@
|
|||||||
using System;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using EnvelopeGenerator.Domain.Entities;
|
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Domain.Entities
|
namespace EnvelopeGenerator.Domain.Entities
|
||||||
{
|
{
|
||||||
|
|||||||
@ -0,0 +1,9 @@
|
|||||||
|
using DigitalData.Core.Contracts.Infrastructure;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Infrastructure.Contracts
|
||||||
|
{
|
||||||
|
public interface IDocumentReceiverElementRepository : ICRUDRepository<DocumentReceiverElement, int>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
using DigitalData.Core.Contracts.Infrastructure;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Infrastructure.Contracts
|
||||||
|
{
|
||||||
|
public interface IDocumentStatusRepository : ICRUDRepository<DocumentStatus, int>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
using DigitalData.Core.Contracts.Infrastructure;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Infrastructure.Contracts
|
||||||
|
{
|
||||||
|
public interface IEmailTemplateRepository : ICRUDRepository<EmailTemplate, int>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
using DigitalData.Core.Contracts.Infrastructure;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Infrastructure.Contracts
|
||||||
|
{
|
||||||
|
public interface IEnvelopeCertificateRepository : ICRUDRepository<EnvelopeCertificate, int>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
using DigitalData.Core.Contracts.Infrastructure;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Infrastructure.Contracts
|
||||||
|
{
|
||||||
|
public interface IEnvelopeHistoryRepository : ICRUDRepository<EnvelopeHistory, long>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
using DigitalData.Core.Contracts.Infrastructure;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Infrastructure.Contracts
|
||||||
|
{
|
||||||
|
public interface IEnvelopeReceiverRepository : ICRUDRepository<EnvelopeReceiver, int>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
using DigitalData.Core.Contracts.Infrastructure;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Infrastructure.Contracts
|
||||||
|
{
|
||||||
|
public interface IEnvelopeRepository : ICRUDRepository<Envelope, int>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
using DigitalData.Core.Contracts.Infrastructure;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Infrastructure.Contracts
|
||||||
|
{
|
||||||
|
public interface IEnvelopeTypeRepository : ICRUDRepository<EnvelopeType, int>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
using DigitalData.Core.Contracts.Infrastructure;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Infrastructure.Contracts
|
||||||
|
{
|
||||||
|
public interface IReceiverRepository : ICRUDRepository<Receiver, int>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
using DigitalData.Core.Contracts.Infrastructure;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Infrastructure.Contracts
|
||||||
|
{
|
||||||
|
public interface IUserReceiverRepository : ICRUDRepository<UserReceiver, int>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,6 +1,14 @@
|
|||||||
namespace EnvelopeGenerator.Infrastructure.Repositories
|
using DigitalData.Core.Infrastructure;
|
||||||
|
using DigitalData.UserManager.Infrastructure.Repositories;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using EnvelopeGenerator.Infrastructure.Contracts;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Infrastructure.Repositories
|
||||||
{
|
{
|
||||||
public class DocumentReceiverElementRepository
|
public class DocumentReceiverElementRepository : CRUDRepository<DocumentReceiverElement, int, EGDbContext>, IDocumentReceiverElementRepository
|
||||||
{
|
{
|
||||||
|
public DocumentReceiverElementRepository(EGDbContext dbContext) : base(dbContext)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
using DigitalData.Core.Infrastructure;
|
||||||
|
using DigitalData.UserManager.Infrastructure.Repositories;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using EnvelopeGenerator.Infrastructure.Contracts;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Infrastructure.Repositories
|
||||||
|
{
|
||||||
|
public class DocumentStatusRepository : CRUDRepository<DocumentStatus, int, EGDbContext>, IDocumentStatusRepository
|
||||||
|
{
|
||||||
|
public DocumentStatusRepository(EGDbContext dbContext) : base(dbContext)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
using DigitalData.Core.Infrastructure;
|
||||||
|
using DigitalData.UserManager.Infrastructure.Repositories;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using EnvelopeGenerator.Infrastructure.Contracts;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Infrastructure.Repositories
|
||||||
|
{
|
||||||
|
public class EmailTemplateRepository : CRUDRepository<EmailTemplate, int, EGDbContext>, IEmailTemplateRepository
|
||||||
|
{
|
||||||
|
public EmailTemplateRepository(EGDbContext dbContext) : base(dbContext)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
using DigitalData.Core.Infrastructure;
|
||||||
|
using DigitalData.UserManager.Infrastructure.Repositories;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using EnvelopeGenerator.Infrastructure.Contracts;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Infrastructure.Repositories
|
||||||
|
{
|
||||||
|
public class EnvelopeCertificateRepository : CRUDRepository<EnvelopeCertificate, int, EGDbContext>, IEnvelopeCertificateRepository
|
||||||
|
{
|
||||||
|
public EnvelopeCertificateRepository(EGDbContext dbContext) : base(dbContext)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
using DigitalData.Core.Infrastructure;
|
||||||
|
using DigitalData.UserManager.Infrastructure.Repositories;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using EnvelopeGenerator.Infrastructure.Contracts;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Infrastructure.Repositories
|
||||||
|
{
|
||||||
|
public class EnvelopeHistoryRepository : CRUDRepository<EnvelopeHistory, long, EGDbContext>, IEnvelopeHistoryRepository
|
||||||
|
{
|
||||||
|
public EnvelopeHistoryRepository(EGDbContext dbContext) : base(dbContext)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
using DigitalData.Core.Infrastructure;
|
||||||
|
using DigitalData.UserManager.Infrastructure.Repositories;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using EnvelopeGenerator.Infrastructure.Contracts;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Infrastructure.Repositories
|
||||||
|
{
|
||||||
|
public class EnvelopeRepository : CRUDRepository<Envelope, int, EGDbContext>, IEnvelopeRepository
|
||||||
|
{
|
||||||
|
public EnvelopeRepository(EGDbContext dbContext) : base(dbContext)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
using DigitalData.Core.Infrastructure;
|
||||||
|
using DigitalData.UserManager.Infrastructure.Repositories;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using EnvelopeGenerator.Infrastructure.Contracts;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Infrastructure.Repositories
|
||||||
|
{
|
||||||
|
public class EnvelopeTypeRepository : CRUDRepository<EnvelopeType, int, EGDbContext>, IEnvelopeTypeRepository
|
||||||
|
{
|
||||||
|
public EnvelopeTypeRepository(EGDbContext dbContext) : base(dbContext)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
using DigitalData.Core.Infrastructure;
|
||||||
|
using DigitalData.UserManager.Infrastructure.Repositories;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using EnvelopeGenerator.Infrastructure.Contracts;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Infrastructure.Repositories
|
||||||
|
{
|
||||||
|
public class EnvelopeReceiverRepository : CRUDRepository<EnvelopeReceiver, int, EGDbContext>, IEnvelopeReceiverRepository
|
||||||
|
{
|
||||||
|
public EnvelopeReceiverRepository(EGDbContext dbContext) : base(dbContext)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
using DigitalData.Core.Infrastructure;
|
||||||
|
using DigitalData.UserManager.Infrastructure.Repositories;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using EnvelopeGenerator.Infrastructure.Contracts;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Infrastructure.Repositories
|
||||||
|
{
|
||||||
|
public class ReceiverRepository : CRUDRepository<Receiver, int, EGDbContext>, IReceiverRepository
|
||||||
|
{
|
||||||
|
public ReceiverRepository(EGDbContext dbContext) : base(dbContext)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
using DigitalData.Core.Infrastructure;
|
||||||
|
using DigitalData.UserManager.Infrastructure.Repositories;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using EnvelopeGenerator.Infrastructure.Contracts;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Infrastructure.Repositories
|
||||||
|
{
|
||||||
|
public class UserReceiverRepository : CRUDRepository<UserReceiver, int, EGDbContext>, IUserReceiverRepository
|
||||||
|
{
|
||||||
|
public UserReceiverRepository(EGDbContext dbContext) : base(dbContext)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -7,11 +7,11 @@ namespace EnvelopeGenerator.Web.Controllers
|
|||||||
{
|
{
|
||||||
public class DocumentController : BaseController
|
public class DocumentController : BaseController
|
||||||
{
|
{
|
||||||
private readonly EnvelopeService envelopeService;
|
private readonly EnvelopeOldService envelopeService;
|
||||||
private readonly ActionService? actionService;
|
private readonly ActionService? actionService;
|
||||||
private readonly IEnvelopeDocumentService _envDocService;
|
private readonly IEnvelopeDocumentService _envDocService;
|
||||||
|
|
||||||
public DocumentController(DatabaseService database, EnvelopeService envelope, IEnvelopeDocumentService envDocService, ILogger<DocumentController> logger) : base(database, logger)
|
public DocumentController(DatabaseService database, EnvelopeOldService envelope, IEnvelopeDocumentService envDocService, ILogger<DocumentController> logger) : base(database, logger)
|
||||||
{
|
{
|
||||||
envelopeService = envelope;
|
envelopeService = envelope;
|
||||||
actionService = database.Services?.actionService;
|
actionService = database.Services?.actionService;
|
||||||
|
|||||||
@ -7,10 +7,10 @@ namespace EnvelopeGenerator.Web.Controllers
|
|||||||
{
|
{
|
||||||
public class EnvelopeController : BaseController
|
public class EnvelopeController : BaseController
|
||||||
{
|
{
|
||||||
private readonly EnvelopeService envelopeService;
|
private readonly EnvelopeOldService envelopeService;
|
||||||
private readonly ActionService? actionService;
|
private readonly ActionService? actionService;
|
||||||
|
|
||||||
public EnvelopeController(DatabaseService database, EnvelopeService envelope, ILogger<EnvelopeController> logger) : base(database, logger)
|
public EnvelopeController(DatabaseService database, EnvelopeOldService envelope, ILogger<EnvelopeController> logger) : base(database, logger)
|
||||||
{
|
{
|
||||||
envelopeService = envelope;
|
envelopeService = envelope;
|
||||||
actionService = database?.Services?.actionService;
|
actionService = database?.Services?.actionService;
|
||||||
|
|||||||
@ -9,10 +9,10 @@ namespace EnvelopeGenerator.Web.Controllers
|
|||||||
{
|
{
|
||||||
public class HomeController : BaseController
|
public class HomeController : BaseController
|
||||||
{
|
{
|
||||||
private readonly EnvelopeService _envelopeService;
|
private readonly EnvelopeOldService _envelopeService;
|
||||||
private readonly IConfiguration _config;
|
private readonly IConfiguration _config;
|
||||||
|
|
||||||
public HomeController(DatabaseService databaseService, EnvelopeService envelopeService, ILogger<HomeController> logger, IConfiguration configuration) : base(databaseService, logger)
|
public HomeController(DatabaseService databaseService, EnvelopeOldService envelopeService, ILogger<HomeController> logger, IConfiguration configuration) : base(databaseService, logger)
|
||||||
{
|
{
|
||||||
_envelopeService = envelopeService;
|
_envelopeService = envelopeService;
|
||||||
_config = configuration;
|
_config = configuration;
|
||||||
|
|||||||
@ -24,7 +24,7 @@ try
|
|||||||
builder.Services.AddScoped<DatabaseService>();
|
builder.Services.AddScoped<DatabaseService>();
|
||||||
|
|
||||||
// Add higher order services
|
// Add higher order services
|
||||||
builder.Services.AddScoped<EnvelopeService>();
|
builder.Services.AddScoped<EnvelopeOldService>();
|
||||||
|
|
||||||
// Add services to the container.
|
// Add services to the container.
|
||||||
builder.Services.AddControllersWithViews().AddJsonOptions(q =>
|
builder.Services.AddControllersWithViews().AddJsonOptions(q =>
|
||||||
@ -46,9 +46,31 @@ try
|
|||||||
//Inject CRUD Service and repositories
|
//Inject CRUD Service and repositories
|
||||||
builder.Services.AddScoped<IConfigRepository, ConfigRepository>();
|
builder.Services.AddScoped<IConfigRepository, ConfigRepository>();
|
||||||
builder.Services.AddScoped<IEnvelopeDocumentRepository, EnvelopeDocumentRepository>();
|
builder.Services.AddScoped<IEnvelopeDocumentRepository, EnvelopeDocumentRepository>();
|
||||||
|
builder.Services.AddScoped<IConfigRepository, ConfigRepository>();
|
||||||
|
builder.Services.AddScoped<IDocumentReceiverElementRepository, DocumentReceiverElementRepository>();
|
||||||
|
builder.Services.AddScoped<IDocumentStatusRepository, DocumentStatusRepository>();
|
||||||
|
builder.Services.AddScoped<IEmailTemplateRepository, EmailTemplateRepository>();
|
||||||
|
builder.Services.AddScoped<IEnvelopeRepository, EnvelopeRepository>();
|
||||||
|
builder.Services.AddScoped<IEnvelopeCertificateRepository, EnvelopeCertificateRepository>();
|
||||||
|
builder.Services.AddScoped<IEnvelopeDocumentRepository, EnvelopeDocumentRepository>();
|
||||||
|
builder.Services.AddScoped<IEnvelopeHistoryRepository, EnvelopeHistoryRepository>();
|
||||||
|
builder.Services.AddScoped<IEnvelopeReceiverRepository, EnvelopeReceiverRepository>();
|
||||||
|
builder.Services.AddScoped<IEnvelopeTypeRepository, EnvelopeTypeRepository>();
|
||||||
|
builder.Services.AddScoped<IReceiverRepository, ReceiverRepository>();
|
||||||
|
builder.Services.AddScoped<IUserReceiverRepository, UserReceiverRepository>();
|
||||||
|
|
||||||
builder.Services.AddScoped<IConfigService, ConfigService>();
|
builder.Services.AddScoped<IConfigService, ConfigService>();
|
||||||
builder.Services.AddScoped<IEnvelopeDocumentService, EnvelopeDocumentService>();
|
builder.Services.AddScoped<IEnvelopeDocumentService, EnvelopeDocumentService>();
|
||||||
|
builder.Services.AddScoped<IDocumentStatusService, DocumentStatusService>();
|
||||||
|
builder.Services.AddScoped<IEmailTemplateService, EmailTemplateService>();
|
||||||
|
builder.Services.AddScoped<IEnvelopeService, EnvelopeService>();
|
||||||
|
builder.Services.AddScoped<IEnvelopeCertificateService, EnvelopeCertificateService>();
|
||||||
|
builder.Services.AddScoped<IEnvelopeDocumentService, EnvelopeDocumentService>();
|
||||||
|
builder.Services.AddScoped<IEnvelopeHistoryService, EnvelopeHistoryService>();
|
||||||
|
builder.Services.AddScoped<IEnvelopeReceiverService, EnvelopeReceiverService>();
|
||||||
|
builder.Services.AddScoped<IEnvelopeTypeService, EnvelopeTypeService>();
|
||||||
|
builder.Services.AddScoped<IReceiverService, ReceiverService>();
|
||||||
|
builder.Services.AddScoped<IUserReceiverService, UserReceiverService>();
|
||||||
|
|
||||||
//Auto mapping profiles
|
//Auto mapping profiles
|
||||||
builder.Services.AddAutoMapper(typeof(BasicDtoMappingProfile).Assembly);
|
builder.Services.AddAutoMapper(typeof(BasicDtoMappingProfile).Assembly);
|
||||||
|
|||||||
@ -4,7 +4,7 @@ using System.Text;
|
|||||||
|
|
||||||
namespace EnvelopeGenerator.Web.Services
|
namespace EnvelopeGenerator.Web.Services
|
||||||
{
|
{
|
||||||
public class EnvelopeService
|
public class EnvelopeOldService
|
||||||
{
|
{
|
||||||
private readonly ReceiverModel receiverModel;
|
private readonly ReceiverModel receiverModel;
|
||||||
private readonly EnvelopeModel envelopeModel;
|
private readonly EnvelopeModel envelopeModel;
|
||||||
@ -13,9 +13,9 @@ namespace EnvelopeGenerator.Web.Services
|
|||||||
private readonly DocumentStatusModel documentStatusModel;
|
private readonly DocumentStatusModel documentStatusModel;
|
||||||
|
|
||||||
private readonly IConfigService _configService;
|
private readonly IConfigService _configService;
|
||||||
private readonly ILogger<EnvelopeService> _logger;
|
private readonly ILogger<EnvelopeOldService> _logger;
|
||||||
|
|
||||||
public EnvelopeService(DatabaseService database, IConfigService configService, ILogger<EnvelopeService> logger)
|
public EnvelopeOldService(DatabaseService database, IConfigService configService, ILogger<EnvelopeOldService> logger)
|
||||||
{
|
{
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user