Refactor namespaces and update DTO structures
Updated namespaces for DTOs and services to improve project organization. Marked several interfaces as obsolete in favor of MediatR for better request handling. Simplified `BaseUpdateDto` and other DTOs by removing `IUnique<int>` implementation. Changed return types of `CreateAsync` methods to return corresponding read DTOs. Removed reference to `DigitalData.Core.DTO` in the project file, reflecting a shift in architecture for maintainability.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
using AutoMapper;
|
||||
using DigitalData.Core.Abstractions.Infrastructure;
|
||||
using DigitalData.Core.Abstraction.Application.DTO;
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using DigitalData.Core.Application;
|
||||
using DigitalData.Core.DTO;
|
||||
using DigitalData.UserManager.Application.Contracts;
|
||||
using DigitalData.UserManager.Application.DTOs.Base;
|
||||
using DigitalData.UserManager.Application.DTOs.User;
|
||||
@@ -9,6 +9,7 @@ using DigitalData.UserManager.Domain.Entities;
|
||||
|
||||
namespace DigitalData.UserManager.Application.Services
|
||||
{
|
||||
[Obsolete("Use MediatR")]
|
||||
public class BaseService<TCRUDRepository, TCreateDto, TReadDto, TBaseEntity> : CRUDService<TCRUDRepository, TCreateDto, TReadDto, TBaseEntity, int>, IBaseService<TCreateDto, TReadDto, TBaseEntity>
|
||||
where TCRUDRepository : ICRUDRepository<TBaseEntity, int>
|
||||
where TCreateDto : BaseCreateDto
|
||||
@@ -25,7 +26,7 @@ namespace DigitalData.UserManager.Application.Services
|
||||
|
||||
public async Task<UserReadDto?> GetUserAsync() => _lazyUserAsync is null ? null : await _lazyUserAsync.Value;
|
||||
|
||||
public override async Task<DataResult<int>> CreateAsync(TCreateDto createDto)
|
||||
public override async Task<DataResult<TReadDto>> CreateAsync(TCreateDto createDto)
|
||||
{
|
||||
var user = await GetUserAsync();
|
||||
if(user is not null)
|
||||
|
||||
Reference in New Issue
Block a user