View Source
  Class SqlExpressionExtensions
  
  String extension methods used specifically to translate into SQL
 
  
  
    Inheritance
      System.Object
      
   
  
  Assembly: Umbraco.Core.dll
  Syntax
  
    public static class SqlExpressionExtensions
   
  Methods
  
  
    View Source
  
  SqlContains(String, String, TextColumnType)
  
  
  Declaration
  
    public static bool SqlContains(this string str, string txt, TextColumnType columnType)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.String | 
        str | 
         | 
      
      
        | System.String | 
        txt | 
         | 
      
      
        | TextColumnType | 
        columnType | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Boolean | 
         | 
      
    
  
  
    View Source
  
  SqlEndsWith(String, String, TextColumnType)
  
  
  Declaration
  
    public static bool SqlEndsWith(this string str, string txt, TextColumnType columnType)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.String | 
        str | 
         | 
      
      
        | System.String | 
        txt | 
         | 
      
      
        | TextColumnType | 
        columnType | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Boolean | 
         | 
      
    
  
  
    View Source
  
  SqlEquals(String, String, TextColumnType)
  
  
  Declaration
  
    public static bool SqlEquals(this string str, string txt, TextColumnType columnType)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.String | 
        str | 
         | 
      
      
        | System.String | 
        txt | 
         | 
      
      
        | TextColumnType | 
        columnType | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Boolean | 
         | 
      
    
  
  
    View Source
  
  SqlIn<T>(IEnumerable<T>, T)
  
  
  Declaration
  
    public static bool SqlIn<T>(this IEnumerable<T> collection, T item)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | IEnumerable<T> | 
        collection | 
         | 
      
      
        | T | 
        item | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Boolean | 
         | 
      
    
  
  Type Parameters
  
  
    View Source
  
  SqlNullableEquals<T>(Nullable<T>, Nullable<T>, T)
  Indicates whether two nullable values are equal, substituting a fallback value for nulls.
 
  
  Declaration
  
    public static bool SqlNullableEquals<T>(this T? value, T? other, T fallbackValue)
    where T : struct
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Nullable<T> | 
        value | 
        The value to compare. 
 | 
      
      
        | System.Nullable<T> | 
        other | 
        The value to compare to. 
 | 
      
      
        | T | 
        fallbackValue | 
        The value to use when any value is null. 
 | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Boolean | 
         | 
      
    
  
  Type Parameters
  
    
      
        | Name | 
        Description | 
      
    
    
      
        | T | 
        The nullable type. 
 | 
      
    
  
  
  
  
    View Source
  
  SqlStartsWith(String, String, TextColumnType)
  
  
  Declaration
  
    public static bool SqlStartsWith(this string str, string txt, TextColumnType columnType)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.String | 
        str | 
         | 
      
      
        | System.String | 
        txt | 
         | 
      
      
        | TextColumnType | 
        columnType | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Boolean | 
         | 
      
    
  
  
    View Source
  
  SqlWildcard(String, String, TextColumnType)
  
  
  Declaration
  
    public static bool SqlWildcard(this string str, string txt, TextColumnType columnType)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.String | 
        str | 
         | 
      
      
        | System.String | 
        txt | 
         | 
      
      
        | TextColumnType | 
        columnType | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Boolean | 
         |