I was going through a tutorial on abp.io:
https://docs.abp.io/en/abp/latest/Tutorials/Part-1?UI=MVC#create-the-application-service
and I created the service:
using Abp.Application.Services;
public interface IBookAppService :
ICrudAppService< //Defines CRUD methods
BookDTO , //Used to show books
Guid, //Primary key of the book entity
PagedAndSortedResultRequestDto, //Used for paging/sorting on getting a list of books
CreateUpdateBookDto, //Used to create a new book
CreateUpdateBookDto> //Used to update a book
{
}
but the interface is showing an error:
The type '
BookDTO
' cannot be used as type parameter 'TEntityDto
' in the generic type or method 'ICrudAppService<TEntityDto, TPrimaryKey, TGetAllInput, TCreateInput, TUpdateInput>
'. There is no implicit reference conversion from 'BookDTO
' to 'Abp.Application.Services.Dto.IEntityDto<System.Guid>
'.
BookDTO
is as follows:
using Volo.Abp.Application.Dtos;
public class BookDTO : AuditedEntityDto<Guid>
{
public string Name { get; set; }
public BookType Type { get; set; }
public DateTime PublishDate { get; set; }
public float Price { get; set; }
}