Below is my code where I am using AutoMapper’s ProjectTo and for that I have to create tests
var feature = await _unitofWork.Repository<MyEntity>().Entities
.Where(
t => t.Id == request.MyEntityId)
.Where(t => t.Id == request.MyEntityId)
.ProjectTo<GetMyEntityByIdDto>(_mapper.ConfigurationProvider)
.ToListAsync(cancellationToken);