Calling two entities in return Ok()

Dev

I have got the result of two entities which contains the list. Is there a way to pass them with status 200?

I can pass one entity as return ok(entity1);

Nour

Yes, you can achieve that by:

return Ok(new {
 firstEntity = entity1, 
 secondEntity = entity2 

});

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related