Skip to main content

AutoQueryDataExtensions

Assembly: ServiceStack.dll
View Source
Declaration
public static class AutoQueryDataExtensions

Methods

ToField(QueryDataFieldAttribute, PropertyInfo, AutoQueryDataFeature)

View Source
Declaration
public static QueryDataField ToField(this QueryDataFieldAttribute attr, PropertyInfo pi, AutoQueryDataFeature feature)
Returns

ServiceStack.QueryDataField

Parameters
TypeName
ServiceStack.QueryDataFieldAttributeattr
System.Reflection.PropertyInfopi
ServiceStack.AutoQueryDataFeaturefeature

CreateQuery<From>(IAutoQueryData, IQueryData<From>, IRequest, IQueryDataSource)

View Source
Declaration
public static DataQuery<From> CreateQuery<From>(this IAutoQueryData autoQuery, IQueryData<From> model, IRequest request, IQueryDataSource db = null)
Returns

ServiceStack.DataQuery<T>

Parameters
TypeName
ServiceStack.IAutoQueryDataautoQuery
ServiceStack.IQueryData<From>model
ServiceStack.Web.IRequestrequest
ServiceStack.IQueryDataSourcedb
Type Parameters
  • From

CreateQuery<From, Into>(IAutoQueryData, IQueryData<From, Into>, IRequest, IQueryDataSource)

View Source
Declaration
public static DataQuery<From> CreateQuery<From, Into>(this IAutoQueryData autoQuery, IQueryData<From, Into> model, IRequest request, IQueryDataSource db = null)
Returns

ServiceStack.DataQuery<T>

Parameters
TypeName
ServiceStack.IAutoQueryDataautoQuery
ServiceStack.IQueryData<From>model
ServiceStack.Web.IRequestrequest
ServiceStack.IQueryDataSourcedb
Type Parameters
  • From
  • Into

MemorySource<T>(QueryDataContext, IEnumerable<T>)

View Source
Declaration
public static IQueryDataSource<T> MemorySource<T>(this QueryDataContext ctx, IEnumerable<T> source)
Returns

ServiceStack.IQueryDataSource<T>

Parameters
TypeName
ServiceStack.QueryDataContextctx
System.Collections.Generic.IEnumerable<<T>>source
Type Parameters
  • T

MemorySource<T>(QueryDataContext, Func<IEnumerable<T>>, ICacheClient, Nullable<TimeSpan>, String)

View Source
Declaration
public static IQueryDataSource<T> MemorySource<T>(this QueryDataContext ctx, Func<IEnumerable<T>> sourceFn, ICacheClient cache, TimeSpan? expiresIn = null, string cacheKey = null)
Returns

ServiceStack.IQueryDataSource<T>

Parameters
TypeName
ServiceStack.QueryDataContextctx
System.Func<System.Collections.Generic.IEnumerable<<T>>>sourceFn
ServiceStack.Caching.ICacheClientcache
System.Nullable<System.TimeSpan>expiresIn
System.StringcacheKey
Type Parameters
  • T

And<T>(IDataQuery, Expression<Func<T, Object>>, QueryCondition, Object)

View Source
Declaration
public static void And<T>(this IDataQuery q, Expression<Func<T, object>> fieldExpr, QueryCondition condition, object value)
Parameters
TypeName
ServiceStack.IDataQueryq
System.Linq.Expressions.Expression<System.Func<<T>,System.Object>>fieldExpr
ServiceStack.QueryConditioncondition
System.Objectvalue
Type Parameters
  • T

Or<T>(IDataQuery, Expression<Func<T, Object>>, QueryCondition, Object)

View Source
Declaration
public static void Or<T>(this IDataQuery q, Expression<Func<T, object>> fieldExpr, QueryCondition condition, object value)
Parameters
TypeName
ServiceStack.IDataQueryq
System.Linq.Expressions.Expression<System.Func<<T>,System.Object>>fieldExpr
ServiceStack.QueryConditioncondition
System.Objectvalue
Type Parameters
  • T

WithAudit<T>(T, IRequest, Nullable<DateTime>)

View Source
Declaration
public static T WithAudit<T>(this T row, IRequest req, DateTime? date = null)
where T : AuditBase
Returns

<T>

Parameters
TypeName
<T>row
ServiceStack.Web.IRequestreq
System.Nullable<System.DateTime>date
Type Parameters
  • T

WithAudit<T>(T, String, Nullable<DateTime>)

View Source
Declaration
public static T WithAudit<T>(this T row, string by, DateTime? date = null)
where T : AuditBase
Returns

<T>

Parameters
TypeName
<T>row
System.Stringby
System.Nullable<System.DateTime>date
Type Parameters
  • T