This problem occurred when I inject IMapper into the MediatR command handler. I injected properly before this happen but after that changed AutoMapper and MediatR configs like bellow. (I added all assemblies of application layers)
services.AddAutoMapper(Assembly.GetExecutingAssembly(),
typeof(CreateAccountCommand).Assembly,
typeof(EfRepository<,>).Assembly,
typeof(IRepository<,>).Assembly,
typeof(KeyValueDto).Assembly);
services.AddMediatR(Assembly.GetExecutingAssembly(),
typeof(CreateAccountCommand).Assembly,
typeof(EfRepository<,>).Assembly,
typeof(IRepository<,>).Assembly,
typeof(KeyValueDto).Assembly);
When I execute CreateAccountCommand the error occures like bellow:
Error constructing handler for request of type MediatR.IRequestHandler`2[Application.Actions.Users.Commands.CreateAccountCommand,Application.Common.Models.GenericResponse`1[System.String]]. Register your handlers with the container. See the samples in GitHub for examples.
Inner exception is bellow
Property 'System.Linq.IQueryable`1[Domain.Entities.Thumbnail] Thumbnails' is not defined for type 'Domain.Entities.Thumbnail' (Parameter 'property')