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