It seems that the simplest things are hard to understand sometimes ... Many code references are of type TEntity, used for general processing of objects in the entity's data model. I tried to use it in my code and get: "Unknown type" TEntity ", what gives ??? Why do I get" Unknown type "? Is it only available in .net 4.0?
BTW: Using .net 3.5.
I am trying to use the code from this book :
public TEntity ExecuteFirstorDefault<TEntity>(ObjectQuery<TEntity> objectQuery)
{
try
{
return objectQuery.FirstOrDefault();
}
catch (EntitySqlException ex)
{
throw ex;
}
}
source
share