Esempio n. 1
0
 protected static void CheckField <TEntity, TFieldType>(ITypedSqlField field)
 {
     Debug.Assert(field != null, "SqlField is null.");
     Debug.Assert(typeof(TEntity) == field.EntityType,
                  $"Incorrect SqlField, entity type does not match. Expected: {typeof(TEntity)}; Actual: {field.EntityType}.");
     Debug.Assert(typeof(TFieldType).IsAssignableFrom(field.FieldType),
                  $"Incorrect SqlField, field type does not match. Expected: {typeof(TFieldType)}; Actual: {field.FieldType}.");
 }
Esempio n. 2
0
 public SqlFilterField <TEntity, object, SqlFilter <TEntity> > And(ITypedSqlField field)
 {
     return(And <object>(field));
 }
Esempio n. 3
0
 public SqlFilterField <TEntity, TFieldType, SqlFilter <TEntity> > And <TFieldType>(ITypedSqlField field)
 {
     CheckField <TEntity, TFieldType>(field);
     return(CreateField <TFieldType>(AddItem(SqlFilterItems.And), field));
 }
Esempio n. 4
0
 public static SqlFilterField <TEntity, object, SqlFilter <TEntity> > From(ITypedSqlField field)
 {
     return(From <object>(field));
 }
Esempio n. 5
0
 public static SqlFilterField <TEntity, TFieldType, SqlFilter <TEntity> > From <TFieldType>(ITypedSqlField field)
 {
     CheckField <TEntity, TFieldType>(field);
     return(CreateField <TFieldType>(ImmutableList <SqlFilterItemCallback> .Empty, field));
 }
Esempio n. 6
0
 private static SqlFilterField <TEntity, TFieldType, SqlFilter <TEntity> > CreateField <TFieldType>(
     ImmutableList <SqlFilterItemCallback> items, ITypedSqlField field)
 {
     return(new SqlFilterField <TEntity, TFieldType, SqlFilter <TEntity> >(items, field, i => new SqlFilter <TEntity>(i)));
 }
Esempio n. 7
0
 public SqlFilterField <TEntity, object, SqlFilter <TEntity> > Or(ITypedSqlField field)
 {
     return(Or <object>(field));
 }
Esempio n. 8
0
 public SqlFilterField <TEntity, TFieldType, MultitableSqlFilter <TEntity> > Or <TFieldType>(ITypedSqlField field)
 {
     CheckField <TEntity, TFieldType>(field);
     return(CreateField <TFieldType>(AddItem(SqlFilterItems.Or), field));
 }