/// <summary> /// Creates the unit of work with specified options. /// </summary> public IUnitOfWork Create(StorageContextOptions options) { return(CreateCore(options)); }
/// <summary> /// Creates the unit of work. /// </summary> protected virtual TableStorageUnitOfWork CreateUnitOfWork(Func <ITableStorageContext> context, StorageContextOptions options) { return(new TableStorageUnitOfWork(this, context, options)); }
public TableStorageUnitOfWork(IUnitOfWorkProvider provider, Func <ITableStorageContext> contextFactory, StorageContextOptions options) { if (options == StorageContextOptions.ReuseParentContext) { var parentUow = provider.GetCurrent() as TableStorageUnitOfWork; if (parentUow != null) { Context = parentUow.Context; return; } } Context = contextFactory(); hasOwnContext = true; }