C#C
C#3y ago
sheru

❔ Retrieving GUID from db with EF core returning 0s

Hi, I'm new to EF core and I don't understand why this issue occurs. So the data in db is fine. But when calling this:
        [HttpGet]
        public virtual async Task<ActionResult<IEnumerable<TReadDto>>> GetAll(
            [FromQuery] QueryOptions queryOptions
        )
        {
            return Ok(await _baseService.GetAll(queryOptions));
        }

replacing all T with OrderReadDto which is this:
public class OrderReadDto
{
    public Guid UserId { get; set; }
    public OrderStatus Status { get; set; }
}

The returned data is this:
[
    {
        "userId": "00000000-0000-0000-0000-000000000000",
        "status": "Processing"
    }
]


Any idea? Thanks in advance.
image.png
Was this page helpful?