Skip to main content

OrmLiteContext

Assembly: ServiceStack.OrmLite.dll
View Source
Declaration
public class OrmLiteContext : object

Properties

Items

Gets a list of items for this context.

View Source
Declaration
public virtual IDictionary Items { get; set; }

OrmLiteState

View Source
Declaration
public static OrmLiteState OrmLiteState { get; set; }

Fields

Instance

View Source
Declaration
public static readonly OrmLiteContext Instance

UseThreadStatic

Tell ServiceStack to use ThreadStatic Items Collection for Context Scoped items. Warning: ThreadStatic Items aren't pinned to the same request in async services which callback on different threads.

View Source
Declaration
public static bool UseThreadStatic

ContextItems

View Source
Declaration
public static IDictionary ContextItems

Methods

ClearItems()

View Source
Declaration
public void ClearItems()

GetOrCreate<T>(Func<T>)

View Source
Declaration
public T GetOrCreate<T>(Func<T> createFn)
Returns

<T>

Parameters
TypeName
Func<<T>>createFn
Type Parameters
  • T

CreateNewState()

View Source
Declaration
public static OrmLiteState CreateNewState()
Returns

ServiceStack.OrmLite.OrmLiteState

GetOrCreateState()

View Source
Declaration
public static OrmLiteState GetOrCreateState()
Returns

ServiceStack.OrmLite.OrmLiteState