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}."); }
public SqlFilterField <TEntity, object, SqlFilter <TEntity> > And(ITypedSqlField field) { return(And <object>(field)); }
public SqlFilterField <TEntity, TFieldType, SqlFilter <TEntity> > And <TFieldType>(ITypedSqlField field) { CheckField <TEntity, TFieldType>(field); return(CreateField <TFieldType>(AddItem(SqlFilterItems.And), field)); }
public static SqlFilterField <TEntity, object, SqlFilter <TEntity> > From(ITypedSqlField field) { return(From <object>(field)); }
public static SqlFilterField <TEntity, TFieldType, SqlFilter <TEntity> > From <TFieldType>(ITypedSqlField field) { CheckField <TEntity, TFieldType>(field); return(CreateField <TFieldType>(ImmutableList <SqlFilterItemCallback> .Empty, field)); }
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))); }
public SqlFilterField <TEntity, object, SqlFilter <TEntity> > Or(ITypedSqlField field) { return(Or <object>(field)); }
public SqlFilterField <TEntity, TFieldType, MultitableSqlFilter <TEntity> > Or <TFieldType>(ITypedSqlField field) { CheckField <TEntity, TFieldType>(field); return(CreateField <TFieldType>(AddItem(SqlFilterItems.Or), field)); }