/// /// Gets the first result following the query with a expression. /// /// The database context. /// FirstOrDefault argument to pass. /// A bool if the first occurrence of {returnTypeName} is returned. 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}); }