Is there a way to tighten this up so that there is only 1 line in the body?
private int _ProjectGuidToId (Guid guid)
{
ProjectEntity res = _dbt.ProjectEntity
.Where(r => r.ProjectGUID == guid.ToString())
.First();
return res.Id;
}
In other words, how do I return 1 value (Id) from 1 row from the database using LINQ in one line of code?
Thanks.
How about something like this?