using DigitalData.Core.Application.DTO; namespace DigitalData.Core.Application.Interfaces { [Obsolete("Use MediatR")] public interface ICRUDService : IReadService where TCreateDto : class where TReadDto : class where TEntity : class { /// /// Asynchronously creates a new entity based on the provided and returns the identifier of the created entity wrapped in a . /// The contains the identifier of the newly created entity on success or an error message on failure. /// /// The data transfer object containing the information for the new entity. /// A task representing the asynchronous operation, with a containing the identifier of the created entity or an error message. Task> CreateAsync(TCreateDto createDto); /// /// Updates an existing entity based on the provided updateDTO and returns the result wrapped in an IServiceMessage, /// indicating the success or failure of the operation, including the error messages on failure. /// /// The updateDTO with updated values for the entity. /// An Result indicating the outcome of the update operation, with an appropriate message. Task UpdateAsync(TUpdateDto updateDto); } }