I need to intercept a call to AutoQuery in order to map a request DTO value to a different value in the underlying DTO.
My Request DTO
[Route("/users", "GET")]
public class FindUsers : QueryDb<User>
{
public string UserName { get; set; }
}
User has a NormalizedUserName property (which I don’t want to expose to the end user) which is an UPPER CASE version of UserName.
While calling FindUsers with UserName = someone, I want it to use NormalizedUserName = SOMEONE during the actual call.
Is there any “clean” way of doing this?