/// /// Gets the first result following the query with a expression. /// /// The database context. /// FirstOrDefault argument to pass. /// A bool if the result is successfull, and the first occurrence of {returnTypeName} public static (bool, {returnTypeFullName}) Get{entityTypeName}With (this {contextFullName} dbContext, Expression> with) { var {findEntityVarName} = dbContext.{propertyName} .Select(x => new {returnTypeFullName}(x)) .FirstOrDefault(with); return ({findEntityVarName} != null, {findEntityVarName}); }