SHA256
Moved and renamed Db/Entity services for better organization.
This commit is contained in:
@@ -1,9 +1,10 @@
|
|||||||
@using Somnia.GuestLog.Models.DTOs;
|
@using Somnia.GuestLog.Models.DTOs;
|
||||||
@using Somnia.GuestLog.Services
|
@using Somnia.GuestLog.Services
|
||||||
|
@using Somnia.GuestLog.Services.Entity
|
||||||
|
|
||||||
@inject ILogger<AddressQueryDialog> logger;
|
@inject ILogger<AddressQueryDialog> logger;
|
||||||
@inject IUserMessageService userMessage
|
@inject IUserMessageService userMessage
|
||||||
@inject IGuestDocumentService guestDocumentService;
|
@inject IGuestDocumentEntityService guestDocumentService;
|
||||||
|
|
||||||
|
|
||||||
<MudDialog Style="max-height: 90%;">
|
<MudDialog Style="max-height: 90%;">
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
@inject IUserMessageService userMessage
|
@inject IUserMessageService userMessage
|
||||||
@inject IDialogService DialogService
|
@inject IDialogService DialogService
|
||||||
@inject NavigationManager Navigation
|
@inject NavigationManager Navigation
|
||||||
@inject IGuestDocumentService guestDocService
|
@inject IGuestDocumentEntityService guestDocService
|
||||||
@inject IStayEntryService stayService
|
@inject IStayEntryEntityService stayService
|
||||||
|
|
||||||
|
|
||||||
<PageTitle>Somnia - Guest Docs - Details</PageTitle>
|
<PageTitle>Somnia - Guest Docs - Details</PageTitle>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
@using Somnia.GuestLog.Models.DTOs;
|
@using Somnia.GuestLog.Models.DTOs;
|
||||||
@using Somnia.GuestLog.Services;
|
@using Somnia.GuestLog.Services;
|
||||||
|
|
||||||
@inject IGuestDocumentService GuestDocService
|
@inject IGuestDocumentEntityService GuestDocService
|
||||||
@inject NavigationManager Navigation
|
@inject NavigationManager Navigation
|
||||||
@inject IUserMessageService userMessage
|
@inject IUserMessageService userMessage
|
||||||
@inject IDialogService DialogService
|
@inject IDialogService DialogService
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
@inject IUserMessageService userMessage
|
@inject IUserMessageService userMessage
|
||||||
@inject IDialogService DialogService
|
@inject IDialogService DialogService
|
||||||
@inject NavigationManager Navigation
|
@inject NavigationManager Navigation
|
||||||
@inject IGuestDocumentService guestDocService
|
@inject IGuestDocumentEntityService guestDocService
|
||||||
@inject IDataListService dataListService;
|
@inject IDataListService dataListService;
|
||||||
|
|
||||||
@inject FluentValidation.IValidator<GuestDocIdDTO> docIdValidator;
|
@inject FluentValidation.IValidator<GuestDocIdDTO> docIdValidator;
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
@inject IUserMessageService userMessage
|
@inject IUserMessageService userMessage
|
||||||
@inject IDialogService DialogService
|
@inject IDialogService DialogService
|
||||||
@inject NavigationManager Navigation
|
@inject NavigationManager Navigation
|
||||||
@inject IGuestDocumentService guestDocService
|
@inject IGuestDocumentEntityService guestDocService
|
||||||
@inject IStayEntryService stayService
|
@inject IStayEntryEntityService stayService
|
||||||
|
|
||||||
|
|
||||||
<PageTitle>Somnia - Guest Docs - Details</PageTitle>
|
<PageTitle>Somnia - Guest Docs - Details</PageTitle>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
@using Somnia.GuestLog.Models.DTOs;
|
@using Somnia.GuestLog.Models.DTOs;
|
||||||
@using Somnia.GuestLog.Services;
|
@using Somnia.GuestLog.Services;
|
||||||
|
|
||||||
@inject IStayEntryService StayEntryService
|
@inject IStayEntryEntityService StayEntryService
|
||||||
@inject NavigationManager Navigation
|
@inject NavigationManager Navigation
|
||||||
@inject IUserMessageService userMessage
|
@inject IUserMessageService userMessage
|
||||||
@inject IDialogService DialogService
|
@inject IDialogService DialogService
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
@inject IUserMessageService userMessage
|
@inject IUserMessageService userMessage
|
||||||
@inject IDialogService DialogService
|
@inject IDialogService DialogService
|
||||||
@inject NavigationManager Navigation
|
@inject NavigationManager Navigation
|
||||||
@inject IStayEntryService stayService
|
@inject IStayEntryEntityService stayService
|
||||||
@inject IDataListService dataListService;
|
@inject IDataListService dataListService;
|
||||||
|
|
||||||
<PageTitle>Somnia - Stay Entries - New</PageTitle>
|
<PageTitle>Somnia - Stay Entries - New</PageTitle>
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
@using Somnia.GuestLog.Components.Controls
|
@using Somnia.GuestLog.Components.Controls
|
||||||
|
@using Somnia.GuestLog.Services.Entity;
|
||||||
@@ -9,6 +9,7 @@ using Somnia.GuestLog.Models.Configuration;
|
|||||||
using Somnia.GuestLog.Models.DTOs;
|
using Somnia.GuestLog.Models.DTOs;
|
||||||
using Somnia.GuestLog.Services;
|
using Somnia.GuestLog.Services;
|
||||||
using Somnia.GuestLog.Services.AddressQuery;
|
using Somnia.GuestLog.Services.AddressQuery;
|
||||||
|
using Somnia.GuestLog.Services.Entity;
|
||||||
using Somnia.GuestLog.Utils;
|
using Somnia.GuestLog.Utils;
|
||||||
using Somnia.GuestLog.Validators;
|
using Somnia.GuestLog.Validators;
|
||||||
|
|
||||||
@@ -55,8 +56,8 @@ builder.Services.AddSingleton<IValidator<GuestDocIdDTO>, GuestDocIdDTOValidator>
|
|||||||
builder.Services.AddSingleton<IValidator<StayEntryDTO>, StayEntryDTOValidator>();
|
builder.Services.AddSingleton<IValidator<StayEntryDTO>, StayEntryDTOValidator>();
|
||||||
|
|
||||||
// Add Services
|
// Add Services
|
||||||
builder.Services.AddSingleton<IGuestDocumentService, GuestDocumentService>();
|
builder.Services.AddSingleton<IGuestDocumentEntityService, GuestDocumentEntityService>();
|
||||||
builder.Services.AddSingleton<IStayEntryService, StayEntryService>();
|
builder.Services.AddSingleton<IStayEntryEntityService, StayEntryEntityService>();
|
||||||
builder.Services.AddSingleton<IDataListService, StaticDataListService>();
|
builder.Services.AddSingleton<IDataListService, StaticDataListService>();
|
||||||
|
|
||||||
builder.Services.AddScoped<IUserMessageService, UserMessageService>();
|
builder.Services.AddScoped<IUserMessageService, UserMessageService>();
|
||||||
|
|||||||
+4
-4
@@ -7,13 +7,13 @@ using Somnia.GuestLog.Models.DTOs;
|
|||||||
using Somnia.GuestLog.Models.Entities;
|
using Somnia.GuestLog.Models.Entities;
|
||||||
using Somnia.GuestLog.Utils;
|
using Somnia.GuestLog.Utils;
|
||||||
|
|
||||||
namespace Somnia.GuestLog.Services;
|
namespace Somnia.GuestLog.Services.Entity;
|
||||||
|
|
||||||
public class GuestDocumentService(
|
public class GuestDocumentEntityService(
|
||||||
ILogger<GuestDocumentService> logger,
|
ILogger<GuestDocumentEntityService> logger,
|
||||||
IDbContextFactory<GuestLogContext> contextFactory,
|
IDbContextFactory<GuestLogContext> contextFactory,
|
||||||
IValidator<GuestDocumentDTO> dtoValidator
|
IValidator<GuestDocumentDTO> dtoValidator
|
||||||
) : IGuestDocumentService
|
) : IGuestDocumentEntityService
|
||||||
{
|
{
|
||||||
public async Task<Result> CreateDocumentAsync(GuestDocumentDTO dto)
|
public async Task<Result> CreateDocumentAsync(GuestDocumentDTO dto)
|
||||||
{
|
{
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
using Somnia.GuestLog.Models.DTOs;
|
using Somnia.GuestLog.Models.DTOs;
|
||||||
|
|
||||||
namespace Somnia.GuestLog.Services;
|
namespace Somnia.GuestLog.Services.Entity;
|
||||||
|
|
||||||
public interface IGuestDocumentService
|
public interface IGuestDocumentEntityService
|
||||||
{
|
{
|
||||||
public Task<Result> CreateDocumentAsync(GuestDocumentDTO dto);
|
public Task<Result> CreateDocumentAsync(GuestDocumentDTO dto);
|
||||||
public Task<Result> UpdateDocumentAsync(GuestDocumentDTO dto);
|
public Task<Result> UpdateDocumentAsync(GuestDocumentDTO dto);
|
||||||
+2
-2
@@ -1,9 +1,9 @@
|
|||||||
using Somnia.GuestLog.Models.DTOs;
|
using Somnia.GuestLog.Models.DTOs;
|
||||||
using Somnia.GuestLog.Models.QueryConfigs;
|
using Somnia.GuestLog.Models.QueryConfigs;
|
||||||
|
|
||||||
namespace Somnia.GuestLog.Services;
|
namespace Somnia.GuestLog.Services.Entity;
|
||||||
|
|
||||||
public interface IStayEntryService
|
public interface IStayEntryEntityService
|
||||||
{
|
{
|
||||||
public Task<Result> CreateEntryAsync(StayEntryDTO dto);
|
public Task<Result> CreateEntryAsync(StayEntryDTO dto);
|
||||||
public Task<Result> UpdateEntryAsync(StayEntryDTO updatedDto);
|
public Task<Result> UpdateEntryAsync(StayEntryDTO updatedDto);
|
||||||
+4
-4
@@ -8,13 +8,13 @@ using Somnia.GuestLog.Models.Entities;
|
|||||||
using Somnia.GuestLog.Models.QueryConfigs;
|
using Somnia.GuestLog.Models.QueryConfigs;
|
||||||
using Somnia.GuestLog.Utils;
|
using Somnia.GuestLog.Utils;
|
||||||
|
|
||||||
namespace Somnia.GuestLog.Services;
|
namespace Somnia.GuestLog.Services.Entity;
|
||||||
|
|
||||||
public class StayEntryService(
|
public class StayEntryEntityService(
|
||||||
ILogger<StayEntryService> logger,
|
ILogger<StayEntryEntityService> logger,
|
||||||
IDbContextFactory<GuestLogContext> contextFactory,
|
IDbContextFactory<GuestLogContext> contextFactory,
|
||||||
IValidator<StayEntryDTO> dtoValidator
|
IValidator<StayEntryDTO> dtoValidator
|
||||||
) : IStayEntryService
|
) : IStayEntryEntityService
|
||||||
{
|
{
|
||||||
public async Task<Result> CreateEntryAsync(StayEntryDTO dto)
|
public async Task<Result> CreateEntryAsync(StayEntryDTO dto)
|
||||||
{
|
{
|
||||||
Reference in New Issue
Block a user