diff --git a/DigitalData.Core.Abstractions/Application/ICRUDService.cs b/DigitalData.Core.Abstractions/Application/ICRUDService.cs index beaf873..9dfec8d 100644 --- a/DigitalData.Core.Abstractions/Application/ICRUDService.cs +++ b/DigitalData.Core.Abstractions/Application/ICRUDService.cs @@ -4,7 +4,7 @@ using DigitalData.Core.DTO; namespace DigitalData.Core.Abstractions.Application { public interface ICRUDService - where TCreateDto : class where TReadDto : class where TUpdateDto : class where TEntity : class + where TCreateDto : class where TReadDto : class where TUpdateDto : IUnique where TEntity : class { Task> CreateAsync(TCreateDto createDto); diff --git a/DigitalData.Core.Application/CRUDService.cs b/DigitalData.Core.Application/CRUDService.cs index e098e6e..c4ddd0a 100644 --- a/DigitalData.Core.Application/CRUDService.cs +++ b/DigitalData.Core.Application/CRUDService.cs @@ -4,6 +4,7 @@ using AutoMapper; using System.Reflection; using System.ComponentModel.DataAnnotations; using DigitalData.Core.DTO; +using DigitalData.Core.Abstractions; namespace DigitalData.Core.Application { @@ -16,7 +17,7 @@ namespace DigitalData.Core.Application /// The entity type. /// The type of the identifier for the entity. public class CRUDService : ICRUDService - where TCRUDRepository : ICRUDRepository where TCreateDto : class where TReadDto : class where TUpdateDto : class where TEntity : class + where TCRUDRepository : ICRUDRepository where TCreateDto : class where TReadDto : class where TUpdateDto : IUnique where TEntity : class { protected readonly TCRUDRepository _repository; protected readonly IMapper _mapper;