public static T GetEntityContext <T>(this IRuntime self, Scope scope = Scope.Context) where T : ObjectContext { return(self.CreateRuntimeTask <ITransactedEfContext <T> >(scope) .GetConnection(self.GetTransaction())); }
public static ITransaction GetServiceTransaction(this IRuntime self, Scope scope = Scope.Context) { return(self.CreateRuntimeTask <ITransaction>(scope)); }
public static SqlConnection GetSqlConnection(this IRuntime self, Scope scope = Scope.Context) { return(self.CreateRuntimeTask <ITransactedSqlConnection>(scope) .GetConnection(self.GetTransaction())); }
public static TTask CreateRuntimeTask <TTask>(this IRuntime runtime) where TTask : IRuntimeTask { return(runtime.CreateRuntimeTask <TTask>(ObjectInitializer.Default.Name, ScopeContext.GetDefaultScope())); }
public static TTask CreateRuntimeTask <TTask>(this IRuntime runtime, string implementationRef) where TTask : IRuntimeTask { return(runtime.CreateRuntimeTask <TTask>(implementationRef, ScopeContext.GetDefaultScope())); }
public static TTask CreateRuntimeTask <TTask>(this IRuntime runtime, Enum implementationRef, Scope scope) where TTask : IRuntimeTask { return(runtime.CreateRuntimeTask <TTask>(implementationRef.ToString(), scope)); }
public static TTask CreateRuntimeTask <TTask>(this IRuntime runtime, Scope scope) where TTask : IRuntimeTask { return(runtime.CreateRuntimeTask <TTask>(ObjectInitializer.Default.Name, scope)); }