SyedMSawaid
SyedMSawaid
TTCTheo's Typesafe Cult
Created by SyedMSawaid on 9/28/2023 in #questions
Is there a way to create a custom object when selecting?
Like in Entity Framework, we do something like this for example.
dbContext.Todos.Where(x => x.Id == id).Select(x => new
{
id = x.Id,
isCreatedByTheo = x.User == "Theo"
}).ToList();
dbContext.Todos.Where(x => x.Id == id).Select(x => new
{
id = x.Id,
isCreatedByTheo = x.User == "Theo"
}).ToList();
Here I can create a custom boolean field which is not part of Todo schema. How can I do that same with Prisma?
1 replies