Handling null result

empormike

New Member
I have a db request that could return \[code\]null\[/code\]: \[code\]Pony MyPony = db.Pony.Where(p => p.PonyOwnerId == user.UserId).First();\[/code\]If there is no row in my db, there is an error message.How to accept an empty query?
 
Back
Top