AutoQueryServiceBase
Assembly: ServiceStack.Server.dll
View Source
public abstract class AutoQueryServiceBase : Service, IService, IServiceBase, IRequiresRequest, IResolver, IServiceFilters, IServiceBeforeFilter, IServiceAfterFilter, IServiceErrorFilter
Properties
AutoQuery
View Source
public IAutoQueryDb AutoQuery { get; set; }
Inherited Properties
AuthRepository
View Source
public virtual IAuthRepository AuthRepository { get; }
AuthRepositoryAsync
View Source
public virtual IAuthRepositoryAsync AuthRepositoryAsync { get; }
Cache
View Source
public virtual ICacheClient Cache { get; }
CacheAsync
View Source
public virtual ICacheClientAsync CacheAsync { get; }
Db
View Source
public virtual IDbConnection Db { get; }
Gateway
View Source
public virtual IServiceGateway Gateway { get; }
GlobalResolver
View Source
public static IResolver GlobalResolver { get; set; }
IsAuthenticated
If user found in session for this request is authenticated.
View Source
public virtual bool IsAuthenticated { get; }
LocalCache
Returns ServiceStack.Caching.MemoryCacheClient. cache is only persisted for this running app instance.
View Source
public virtual MemoryCacheClient LocalCache { get; }
MessageProducer
View Source
public virtual IMessageProducer MessageProducer { get; }
Redis
View Source
public virtual IRedisClient Redis { get; }
Request
View Source
public IRequest Request { get; set; }
Response
View Source
protected virtual IResponse Response { get; }
SessionBag
View Source
public virtual ISession SessionBag { get; }
SessionBagAsync
View Source
public virtual ISessionAsync SessionBagAsync { get; }
SessionFactory
View Source
public virtual ISessionFactory SessionFactory { get; }
VirtualFiles
Read/Write Virtual FileSystem. Defaults to FileSystemVirtualPathProvider
View Source
public IVirtualFiles VirtualFiles { get; }
VirtualFileSources
Cascading collection of virtual file sources, inc. Embedded Resources, File System, In Memory, S3
View Source
public IVirtualPathProvider VirtualFileSources { get; }
Methods
Create<Table>(ICreateDb<Table>)
View Source
public virtual object Create<Table>(ICreateDb<Table> dto)
Returns
System.Object
Parameters
Type | Name |
---|---|
ServiceStack.ICreateDb<Table> | dto |
Type Parameters
Table
CreateAsync<Table>(ICreateDb<Table>)
View Source
public virtual Task<object> CreateAsync<Table>(ICreateDb<Table> dto)
Returns
Task<System.Object>
Parameters
Type | Name |
---|---|
ServiceStack.ICreateDb<Table> | dto |
Type Parameters
Table
BatchCreateAsync<T>(IEnumerable<ICreateDb<T>>)
View Source
public virtual async Task<object> BatchCreateAsync<T>(IEnumerable<ICreateDb<T>> requests)
Returns
Task<System.Object>
Parameters
Type | Name |
---|---|
IEnumerable<ServiceStack.ICreateDb<<T>>> | requests |
Type Parameters
T
Update<Table>(IUpdateDb<Table>)
View Source
public virtual object Update<Table>(IUpdateDb<Table> dto)
Returns
System.Object
Parameters
Type | Name |
---|---|
ServiceStack.IUpdateDb<Table> | dto |
Type Parameters
Table
UpdateAsync<Table>(IUpdateDb<Table>)
View Source
public virtual Task<object> UpdateAsync<Table>(IUpdateDb<Table> dto)
Returns
Task<System.Object>
Parameters
Type | Name |
---|---|
ServiceStack.IUpdateDb<Table> | dto |
Type Parameters
Table
BatchUpdateAsync<T>(IEnumerable<IUpdateDb<T>>)
View Source
public virtual async Task<object> BatchUpdateAsync<T>(IEnumerable<IUpdateDb<T>> requests)
Returns
Task<System.Object>
Parameters
Type | Name |
---|---|
IEnumerable<ServiceStack.IUpdateDb<<T>>> | requests |
Type Parameters
T
Patch<Table>(IPatchDb<Table>)
View Source
public virtual object Patch<Table>(IPatchDb<Table> dto)
Returns
System.Object
Parameters
Type | Name |
---|---|
ServiceStack.IPatchDb<Table> | dto |
Type Parameters
Table
PatchAsync<Table>(IPatchDb<Table>)
View Source
public virtual Task<object> PatchAsync<Table>(IPatchDb<Table> dto)
Returns
Task<System.Object>
Parameters
Type | Name |
---|---|
ServiceStack.IPatchDb<Table> | dto |
Type Parameters
Table
BatchPatchAsync<T>(IEnumerable<IPatchDb<T>>)
View Source
public virtual async Task<object> BatchPatchAsync<T>(IEnumerable<IPatchDb<T>> requests)
Returns
Task<System.Object>
Parameters
Type | Name |
---|---|
IEnumerable<ServiceStack.IPatchDb<<T>>> | requests |
Type Parameters
T
Delete<Table>(IDeleteDb<Table>)
View Source
public virtual object Delete<Table>(IDeleteDb<Table> dto)
Returns
System.Object
Parameters
Type | Name |
---|---|
ServiceStack.IDeleteDb<Table> | dto |
Type Parameters
Table
DeleteAsync<Table>(IDeleteDb<Table>)
View Source
public virtual Task<object> DeleteAsync<Table>(IDeleteDb<Table> dto)
Returns
Task<System.Object>
Parameters
Type | Name |
---|---|
ServiceStack.IDeleteDb<Table> | dto |
Type Parameters
Table
BatchDeleteAsync<T>(IEnumerable<IDeleteDb<T>>)
View Source
public virtual async Task<object> BatchDeleteAsync<T>(IEnumerable<IDeleteDb<T>> requests)
Returns
Task<System.Object>
Parameters
Type | Name |
---|---|
IEnumerable<ServiceStack.IDeleteDb<<T>>> | requests |
Type Parameters
T
Save<Table>(ISaveDb<Table>)
View Source
public virtual object Save<Table>(ISaveDb<Table> dto)
Returns
System.Object
Parameters
Type | Name |
---|---|
ServiceStack.ISaveDb<Table> | dto |
Type Parameters
Table
SaveAsync<Table>(ISaveDb<Table>)
View Source
public virtual Task<object> SaveAsync<Table>(ISaveDb<Table> dto)
Returns
Task<System.Object>
Parameters
Type | Name |
---|---|
ServiceStack.ISaveDb<Table> | dto |
Type Parameters
Table
BatchSaveAsync<T>(IEnumerable<ISaveDb<T>>)
View Source
public virtual async Task<object> BatchSaveAsync<T>(IEnumerable<ISaveDb<T>> requests)
Returns
Task<System.Object>
Parameters
Type | Name |
---|---|
IEnumerable<ServiceStack.ISaveDb<<T>>> | requests |
Type Parameters
T
Exec<From>(IQueryDb<From>)
View Source
public virtual object Exec<From>(IQueryDb<From> dto)
Returns
System.Object
Parameters
Type | Name |
---|---|
ServiceStack.IQueryDb<From> | dto |
Type Parameters
From
ExecAsync<From>(IQueryDb<From>)
View Source
public virtual async Task<object> ExecAsync<From>(IQueryDb<From> dto)
Returns
Task<System.Object>
Parameters
Type | Name |
---|---|
ServiceStack.IQueryDb<From> | dto |
Type Parameters
From
Exec<From, Into>(IQueryDb<From, Into>)
View Source
public virtual object Exec<From, Into>(IQueryDb<From, Into> dto)
Returns
System.Object
Parameters
Type | Name |
---|---|
ServiceStack.IQueryDb<From> | dto |
Type Parameters
From
Into
ExecAsync<From, Into>(IQueryDb<From, Into>)
View Source
public virtual async Task<object> ExecAsync<From, Into>(IQueryDb<From, Into> dto)
Returns
Task<System.Object>
Parameters
Type | Name |
---|---|
ServiceStack.IQueryDb<From> | dto |
Type Parameters
From
Into
Inherited Methods
AssertPlugin<T>()
View Source
public T AssertPlugin<T>()
where T : class, IPlugin
Returns
<T>
Type Parameters
T
Dispose()
Disposes all created disposable properties of this service
and executes disposing of all request System.IDisposable
s
(warning, manually triggering this might lead to unwanted disposing of all request related objects and services.)
View Source
public virtual void Dispose()
DisposeAsync()
View Source
public async ValueTask DisposeAsync()
Returns
ValueTask
GetPlugin<T>()
View Source
public T GetPlugin<T>()
where T : class, IPlugin
Returns
<T>
Type Parameters
T
GetRedisAsync()
View Source
public virtual ValueTask<IRedisClientAsync> GetRedisAsync()
Returns
ValueTask<ServiceStack.Redis.IRedisClientAsync>
GetResolver()
View Source
public virtual IResolver GetResolver()
Returns
ServiceStack.Configuration.IResolver
GetSession(Boolean)
View Source
public virtual IAuthSession GetSession(bool reload = false)
Returns
ServiceStack.Auth.IAuthSession
Parameters
Type | Name |
---|---|
System.Boolean | reload |
GetSessionAsync(Boolean, CancellationToken)
View Source
public virtual Task<IAuthSession> GetSessionAsync(bool reload = false, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<ServiceStack.Auth.IAuthSession>
Parameters
Type | Name |
---|---|
System.Boolean | reload |
System.Threading.CancellationToken | token |
OnAfterExecute(Object)
View Source
public virtual object OnAfterExecute(object response)
Returns
System.Object
Parameters
Type | Name |
---|---|
System.Object | response |
OnBeforeExecute(Object)
View Source
public virtual void OnBeforeExecute(object requestDto)
Parameters
Type | Name |
---|---|
System.Object | requestDto |
OnExceptionAsync(Object, Exception)
View Source
public virtual Task<object> OnExceptionAsync(object requestDto, Exception ex)
Returns
System.Threading.Tasks.Task<System.Object>
Parameters
Type | Name |
---|---|
System.Object | requestDto |
System.Exception | ex |
OpenDbConnection(String)
View Source
public virtual IDbConnection OpenDbConnection(string namedConnection)
Returns
System.Data.IDbConnection
Parameters
Type | Name |
---|---|
System.String | namedConnection |
PublishMessage<T>(T)
Publish a MQ message over the ServiceStack.Messaging.IMessageProducer implementation.
View Source
public virtual void PublishMessage<T>(T message)
Parameters
Type | Name |
---|---|
<T> | message |
Type Parameters
T
ResolveService<T>()
View Source
public virtual T ResolveService<T>()
Returns
<T>
Type Parameters
T
SessionAs<TUserSession>()
Typed UserSession
View Source
protected virtual TUserSession SessionAs<TUserSession>()
Returns
<TUserSession>
Type Parameters
TUserSession
SessionAsAsync<TUserSession>()
Typed UserSession
View Source
protected virtual async Task<TUserSession> SessionAsAsync<TUserSession>()
Returns
System.Threading.Tasks.Task<<TUserSession>>
Type Parameters
TUserSession
SetResolver(IResolver)
View Source
public virtual Service SetResolver(IResolver resolver)
Returns
Parameters
Type | Name |
---|---|
ServiceStack.Configuration.IResolver | resolver |
TryResolve<T>()
View Source
public virtual T TryResolve<T>()
Returns
<T>
Type Parameters
T