/// /// Gets the first result in the table, and returns a projection of . /// /// The database context. /// By {byParamPropertyName} /// A bool if the result is successfull, and the first occurrence of {entityTypeName} as a projection public static (bool, {returnTypeFullName}) GetOne{entityTypeName}By{byParamPropertyName} (this {contextFullName} dbContext, {byParamFullType} {byParamVarName}) { var {findEntityVarName} = dbContext.{propertyName} .Where(x => x.{byParamPropertyName} == {byParamVarName}) .Select(x => new {returnTypeFullName}(x)) .FirstOrDefault(); return ({findEntityVarName} != null, {findEntityVarName}); }