I want to do a simple lambda expression like this:
IList list = GetSomeList(); MyEntity1 result = list.SingleOrDefault(
Well, first off, are you trying to use this in linq to sql / entity framework / other?
If not, then just do this
list.SingleOrDefault(e => { var entity = GetMyEntity2(e); return entity != null && entity.Id != null && entity.Id > 0; });