I have seen how to initialize var to null. This does not help in my situation. I have
string nuller = null;
var firstModel = nuller;
if(contextSelectResult.Count() > 0)
firstModel = contextSelectResult.First();
I get error
Cannot implicitly convert type 'SomeNamespace.Model.tableName' to 'string'.
I am trying to avoid try/catching InvalidOperation
for First()
when no first exists as its expensive. So, how can I get past the scope issue here?