UnitOfWorkOptions to AbpUnitOfWorkOptions

pull/1919/head
Yunus Emre Kalkan 6 years ago
parent 2f6eac8c7c
commit 521b3ac89c

@ -68,9 +68,9 @@ namespace Volo.Abp.AspNetCore.Mvc.Uow
} }
} }
private UnitOfWorkOptions CreateOptions(ActionExecutingContext context, UnitOfWorkAttribute unitOfWorkAttribute) private AbpUnitOfWorkOptions CreateOptions(ActionExecutingContext context, UnitOfWorkAttribute unitOfWorkAttribute)
{ {
var options = new UnitOfWorkOptions(); var options = new AbpUnitOfWorkOptions();
unitOfWorkAttribute?.SetOptions(options); unitOfWorkAttribute?.SetOptions(options);

@ -3,7 +3,7 @@ using System.Data;
namespace Volo.Abp.Uow namespace Volo.Abp.Uow
{ {
public class UnitOfWorkOptions : IUnitOfWorkOptions public class AbpUnitOfWorkOptions : IAbpUnitOfWorkOptions
{ {
/// <summary> /// <summary>
/// Default: false. /// Default: false.
@ -14,9 +14,9 @@ namespace Volo.Abp.Uow
public TimeSpan? Timeout { get; set; } public TimeSpan? Timeout { get; set; }
public UnitOfWorkOptions Clone() public AbpUnitOfWorkOptions Clone()
{ {
return new UnitOfWorkOptions return new AbpUnitOfWorkOptions
{ {
IsTransactional = IsTransactional, IsTransactional = IsTransactional,
IsolationLevel = IsolationLevel, IsolationLevel = IsolationLevel,

@ -9,7 +9,7 @@ namespace Volo.Abp.Uow
{ {
public Guid Id => _parent.Id; public Guid Id => _parent.Id;
public IUnitOfWorkOptions Options => _parent.Options; public IAbpUnitOfWorkOptions Options => _parent.Options;
public IUnitOfWork Outer => _parent.Outer; public IUnitOfWork Outer => _parent.Outer;
@ -43,7 +43,7 @@ namespace Volo.Abp.Uow
_parent.SetOuter(outer); _parent.SetOuter(outer);
} }
public void Initialize(UnitOfWorkOptions options) public void Initialize(AbpUnitOfWorkOptions options)
{ {
_parent.Initialize(options); _parent.Initialize(options);
} }

@ -3,7 +3,7 @@ using System.Data;
namespace Volo.Abp.Uow namespace Volo.Abp.Uow
{ {
public interface IUnitOfWorkOptions public interface IAbpUnitOfWorkOptions
{ {
bool IsTransactional { get; } bool IsTransactional { get; }

@ -14,7 +14,7 @@ namespace Volo.Abp.Uow
event EventHandler<UnitOfWorkEventArgs> Disposed; event EventHandler<UnitOfWorkEventArgs> Disposed;
IUnitOfWorkOptions Options { get; } IAbpUnitOfWorkOptions Options { get; }
IUnitOfWork Outer { get; } IUnitOfWork Outer { get; }
@ -28,7 +28,7 @@ namespace Volo.Abp.Uow
void SetOuter([CanBeNull] IUnitOfWork outer); void SetOuter([CanBeNull] IUnitOfWork outer);
void Initialize([NotNull] UnitOfWorkOptions options); void Initialize([NotNull] AbpUnitOfWorkOptions options);
void Reserve([NotNull] string reservationName); void Reserve([NotNull] string reservationName);

@ -8,13 +8,13 @@ namespace Volo.Abp.Uow
IUnitOfWork Current { get; } IUnitOfWork Current { get; }
[NotNull] [NotNull]
IUnitOfWork Begin([NotNull] UnitOfWorkOptions options, bool requiresNew = false); IUnitOfWork Begin([NotNull] AbpUnitOfWorkOptions options, bool requiresNew = false);
[NotNull] [NotNull]
IUnitOfWork Reserve([NotNull] string reservationName, bool requiresNew = false); IUnitOfWork Reserve([NotNull] string reservationName, bool requiresNew = false);
void BeginReserved([NotNull] string reservationName, [NotNull] UnitOfWorkOptions options); void BeginReserved([NotNull] string reservationName, [NotNull] AbpUnitOfWorkOptions options);
bool TryBeginReserved([NotNull] string reservationName, [NotNull] UnitOfWorkOptions options); bool TryBeginReserved([NotNull] string reservationName, [NotNull] AbpUnitOfWorkOptions options);
} }
} }

@ -13,7 +13,7 @@ namespace Volo.Abp.Uow
{ {
public Guid Id { get; } = Guid.NewGuid(); public Guid Id { get; } = Guid.NewGuid();
public IUnitOfWorkOptions Options { get; private set; } public IAbpUnitOfWorkOptions Options { get; private set; }
public IUnitOfWork Outer { get; private set; } public IUnitOfWork Outer { get; private set; }
@ -49,7 +49,7 @@ namespace Volo.Abp.Uow
_transactionApis = new Dictionary<string, ITransactionApi>(); _transactionApis = new Dictionary<string, ITransactionApi>();
} }
public virtual void Initialize(UnitOfWorkOptions options) public virtual void Initialize(AbpUnitOfWorkOptions options)
{ {
Check.NotNull(options, nameof(options)); Check.NotNull(options, nameof(options));

@ -62,7 +62,7 @@ namespace Volo.Abp.Uow
//TODO: More constructors! //TODO: More constructors!
public virtual void SetOptions(UnitOfWorkOptions options) public virtual void SetOptions(AbpUnitOfWorkOptions options)
{ {
if (IsTransactional.HasValue) if (IsTransactional.HasValue)
{ {

@ -16,7 +16,7 @@ namespace Volo.Abp.Uow
public TimeSpan? Timeout { get; set; } public TimeSpan? Timeout { get; set; }
internal UnitOfWorkOptions Normalize(UnitOfWorkOptions options) internal AbpUnitOfWorkOptions Normalize(AbpUnitOfWorkOptions options)
{ {
if (options.IsolationLevel == null) if (options.IsolationLevel == null)
{ {

@ -48,9 +48,9 @@ namespace Volo.Abp.Uow
} }
} }
private UnitOfWorkOptions CreateOptions(IAbpMethodInvocation invocation, [CanBeNull] UnitOfWorkAttribute unitOfWorkAttribute) private AbpUnitOfWorkOptions CreateOptions(IAbpMethodInvocation invocation, [CanBeNull] UnitOfWorkAttribute unitOfWorkAttribute)
{ {
var options = new UnitOfWorkOptions(); var options = new AbpUnitOfWorkOptions();
unitOfWorkAttribute?.SetOptions(options); unitOfWorkAttribute?.SetOptions(options);

@ -19,7 +19,7 @@ namespace Volo.Abp.Uow
_serviceScopeFactory = serviceScopeFactory; _serviceScopeFactory = serviceScopeFactory;
} }
public IUnitOfWork Begin(UnitOfWorkOptions options, bool requiresNew = false) public IUnitOfWork Begin(AbpUnitOfWorkOptions options, bool requiresNew = false)
{ {
Check.NotNull(options, nameof(options)); Check.NotNull(options, nameof(options));
@ -52,7 +52,7 @@ namespace Volo.Abp.Uow
return unitOfWork; return unitOfWork;
} }
public void BeginReserved(string reservationName, UnitOfWorkOptions options) public void BeginReserved(string reservationName, AbpUnitOfWorkOptions options)
{ {
if (!TryBeginReserved(reservationName, options)) if (!TryBeginReserved(reservationName, options))
{ {
@ -60,7 +60,7 @@ namespace Volo.Abp.Uow
} }
} }
public bool TryBeginReserved(string reservationName, UnitOfWorkOptions options) public bool TryBeginReserved(string reservationName, AbpUnitOfWorkOptions options)
{ {
Check.NotNull(reservationName, nameof(reservationName)); Check.NotNull(reservationName, nameof(reservationName));

@ -9,7 +9,7 @@ namespace Volo.Abp.Uow
{ {
Check.NotNull(unitOfWorkManager, nameof(unitOfWorkManager)); Check.NotNull(unitOfWorkManager, nameof(unitOfWorkManager));
return unitOfWorkManager.Begin(new UnitOfWorkOptions(), requiresNew); return unitOfWorkManager.Begin(new AbpUnitOfWorkOptions(), requiresNew);
} }
public static void BeginReserved([NotNull] this IUnitOfWorkManager unitOfWorkManager, [NotNull] string reservationName) public static void BeginReserved([NotNull] this IUnitOfWorkManager unitOfWorkManager, [NotNull] string reservationName)
@ -17,7 +17,7 @@ namespace Volo.Abp.Uow
Check.NotNull(unitOfWorkManager, nameof(unitOfWorkManager)); Check.NotNull(unitOfWorkManager, nameof(unitOfWorkManager));
Check.NotNull(reservationName, nameof(reservationName)); Check.NotNull(reservationName, nameof(reservationName));
unitOfWorkManager.BeginReserved(reservationName, new UnitOfWorkOptions()); unitOfWorkManager.BeginReserved(reservationName, new AbpUnitOfWorkOptions());
} }
public static void TryBeginReserved([NotNull] this IUnitOfWorkManager unitOfWorkManager, [NotNull] string reservationName) public static void TryBeginReserved([NotNull] this IUnitOfWorkManager unitOfWorkManager, [NotNull] string reservationName)
@ -25,7 +25,7 @@ namespace Volo.Abp.Uow
Check.NotNull(unitOfWorkManager, nameof(unitOfWorkManager)); Check.NotNull(unitOfWorkManager, nameof(unitOfWorkManager));
Check.NotNull(reservationName, nameof(reservationName)); Check.NotNull(reservationName, nameof(reservationName));
unitOfWorkManager.TryBeginReserved(reservationName, new UnitOfWorkOptions()); unitOfWorkManager.TryBeginReserved(reservationName, new AbpUnitOfWorkOptions());
} }
} }
} }

@ -36,7 +36,7 @@ namespace Volo.Abp.Dapper.Repositories
var unitOfWorkManager = GetRequiredService<IUnitOfWorkManager>(); var unitOfWorkManager = GetRequiredService<IUnitOfWorkManager>();
var personDapperRepository = GetRequiredService<PersonDapperRepository>(); var personDapperRepository = GetRequiredService<PersonDapperRepository>();
using (var uow = unitOfWorkManager.Begin(new UnitOfWorkOptions using (var uow = unitOfWorkManager.Begin(new AbpUnitOfWorkOptions
{ {
IsTransactional = true IsTransactional = true
})) }))

@ -32,7 +32,7 @@ namespace Volo.Abp.EntityFrameworkCore.Transactions
try try
{ {
await WithUnitOfWorkAsync(new UnitOfWorkOptions { IsTransactional = true }, async () => await WithUnitOfWorkAsync(new AbpUnitOfWorkOptions { IsTransactional = true }, async () =>
{ {
await _personRepository.InsertAsync(new Person(personId, "Adam", 42)); await _personRepository.InsertAsync(new Person(personId, "Adam", 42));
throw new Exception(exceptionMessage); throw new Exception(exceptionMessage);
@ -52,7 +52,7 @@ namespace Volo.Abp.EntityFrameworkCore.Transactions
{ {
var personId = Guid.NewGuid(); var personId = Guid.NewGuid();
await WithUnitOfWorkAsync(new UnitOfWorkOptions { IsTransactional = true }, async () => await WithUnitOfWorkAsync(new AbpUnitOfWorkOptions { IsTransactional = true }, async () =>
{ {
_unitOfWorkManager.Current.ShouldNotBeNull(); _unitOfWorkManager.Current.ShouldNotBeNull();
@ -75,7 +75,7 @@ namespace Volo.Abp.EntityFrameworkCore.Transactions
{ {
var uowManager = scope.ServiceProvider.GetRequiredService<IUnitOfWorkManager>(); var uowManager = scope.ServiceProvider.GetRequiredService<IUnitOfWorkManager>();
using (uowManager.Begin(new UnitOfWorkOptions { IsTransactional = true })) using (uowManager.Begin(new AbpUnitOfWorkOptions { IsTransactional = true }))
{ {
_unitOfWorkManager.Current.ShouldNotBeNull(); _unitOfWorkManager.Current.ShouldNotBeNull();

@ -18,10 +18,10 @@ namespace Volo.Abp.TestApp.Testing
protected virtual void WithUnitOfWork(Action action) protected virtual void WithUnitOfWork(Action action)
{ {
WithUnitOfWork(new UnitOfWorkOptions(), action); WithUnitOfWork(new AbpUnitOfWorkOptions(), action);
} }
protected virtual void WithUnitOfWork(UnitOfWorkOptions options, Action action) protected virtual void WithUnitOfWork(AbpUnitOfWorkOptions options, Action action)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {
@ -38,10 +38,10 @@ namespace Volo.Abp.TestApp.Testing
protected virtual Task WithUnitOfWorkAsync(Func<Task> func) protected virtual Task WithUnitOfWorkAsync(Func<Task> func)
{ {
return WithUnitOfWorkAsync(new UnitOfWorkOptions(), func); return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func);
} }
protected virtual async Task WithUnitOfWorkAsync(UnitOfWorkOptions options, Func<Task> action) protected virtual async Task WithUnitOfWorkAsync(AbpUnitOfWorkOptions options, Func<Task> action)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {
@ -58,10 +58,10 @@ namespace Volo.Abp.TestApp.Testing
protected virtual TResult WithUnitOfWork<TResult>(Func<TResult> func) protected virtual TResult WithUnitOfWork<TResult>(Func<TResult> func)
{ {
return WithUnitOfWork(new UnitOfWorkOptions(), func); return WithUnitOfWork(new AbpUnitOfWorkOptions(), func);
} }
protected virtual TResult WithUnitOfWork<TResult>(UnitOfWorkOptions options, Func<TResult> func) protected virtual TResult WithUnitOfWork<TResult>(AbpUnitOfWorkOptions options, Func<TResult> func)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {
@ -78,10 +78,10 @@ namespace Volo.Abp.TestApp.Testing
protected virtual Task<TResult> WithUnitOfWorkAsync<TResult>(Func<Task<TResult>> func) protected virtual Task<TResult> WithUnitOfWorkAsync<TResult>(Func<Task<TResult>> func)
{ {
return WithUnitOfWorkAsync(new UnitOfWorkOptions(), func); return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func);
} }
protected virtual async Task<TResult> WithUnitOfWorkAsync<TResult>(UnitOfWorkOptions options, Func<Task<TResult>> func) protected virtual async Task<TResult> WithUnitOfWorkAsync<TResult>(AbpUnitOfWorkOptions options, Func<Task<TResult>> func)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {

@ -13,7 +13,7 @@ namespace Volo.Abp.PermissionManagement
{ {
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.AddEmbedded<AbpPermissionManagementDomainSharedModule>(); options.FileSets.AddEmbedded<AbpPermissionManagementDomainSharedModule>();
}); });

@ -32,7 +32,7 @@ namespace Volo.Abp.PermissionManagement.Web
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.AddEmbedded<AbpPermissionManagementWebModule>("Volo.Abp.PermissionManagement.Web"); options.FileSets.AddEmbedded<AbpPermissionManagementWebModule>("Volo.Abp.PermissionManagement.Web");
}); });

@ -10,7 +10,7 @@ namespace Volo.Abp.SettingManagement
{ {
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.AddEmbedded<AbpSettingManagementDomainSharedModule>(); options.FileSets.AddEmbedded<AbpSettingManagementDomainSharedModule>();
}); });

@ -28,7 +28,7 @@ namespace Volo.Abp.SettingManagement.Web
options.MenuContributors.Add(new SettingManagementMainMenuContributor()); options.MenuContributors.Add(new SettingManagementMainMenuContributor());
}); });
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.AddEmbedded<AbpSettingManagementWebModule>("Volo.Abp.SettingManagement.Web"); options.FileSets.AddEmbedded<AbpSettingManagementWebModule>("Volo.Abp.SettingManagement.Web");
}); });

@ -10,7 +10,7 @@ namespace Volo.Abp.TenantManagement
{ {
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.AddEmbedded<AbpTenantManagementDomainSharedModule>(); options.FileSets.AddEmbedded<AbpTenantManagementDomainSharedModule>();
}); });

@ -42,7 +42,7 @@ namespace Volo.Abp.TenantManagement.Web
options.MenuContributors.Add(new AbpTenantManagementWebMainMenuContributor()); options.MenuContributors.Add(new AbpTenantManagementWebMainMenuContributor());
}); });
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.AddEmbedded<AbpTenantManagementWebModule>("Volo.Abp.TenantManagement.Web"); options.FileSets.AddEmbedded<AbpTenantManagementWebModule>("Volo.Abp.TenantManagement.Web");
}); });

@ -28,7 +28,7 @@ namespace Acme.BookStore
{ {
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.AddEmbedded<BookStoreDomainSharedModule>("Acme.BookStore"); options.FileSets.AddEmbedded<BookStoreDomainSharedModule>("Acme.BookStore");
}); });

@ -69,7 +69,7 @@ namespace Acme.BookStore
if (hostingEnvironment.IsDevelopment()) if (hostingEnvironment.IsDevelopment())
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.ReplaceEmbeddedByPhysical<BookStoreDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}Acme.BookStore.Domain.Shared")); options.FileSets.ReplaceEmbeddedByPhysical<BookStoreDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}Acme.BookStore.Domain.Shared"));
options.FileSets.ReplaceEmbeddedByPhysical<BookStoreDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}Acme.BookStore.Domain")); options.FileSets.ReplaceEmbeddedByPhysical<BookStoreDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}Acme.BookStore.Domain"));

@ -19,10 +19,10 @@ namespace Acme.BookStore
protected virtual void WithUnitOfWork(Action action) protected virtual void WithUnitOfWork(Action action)
{ {
WithUnitOfWork(new UnitOfWorkOptions(), action); WithUnitOfWork(new AbpUnitOfWorkOptions(), action);
} }
protected virtual void WithUnitOfWork(UnitOfWorkOptions options, Action action) protected virtual void WithUnitOfWork(AbpUnitOfWorkOptions options, Action action)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {
@ -39,10 +39,10 @@ namespace Acme.BookStore
protected virtual Task WithUnitOfWorkAsync(Func<Task> func) protected virtual Task WithUnitOfWorkAsync(Func<Task> func)
{ {
return WithUnitOfWorkAsync(new UnitOfWorkOptions(), func); return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func);
} }
protected virtual async Task WithUnitOfWorkAsync(UnitOfWorkOptions options, Func<Task> action) protected virtual async Task WithUnitOfWorkAsync(AbpUnitOfWorkOptions options, Func<Task> action)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {
@ -59,10 +59,10 @@ namespace Acme.BookStore
protected virtual TResult WithUnitOfWork<TResult>(Func<TResult> func) protected virtual TResult WithUnitOfWork<TResult>(Func<TResult> func)
{ {
return WithUnitOfWork(new UnitOfWorkOptions(), func); return WithUnitOfWork(new AbpUnitOfWorkOptions(), func);
} }
protected virtual TResult WithUnitOfWork<TResult>(UnitOfWorkOptions options, Func<TResult> func) protected virtual TResult WithUnitOfWork<TResult>(AbpUnitOfWorkOptions options, Func<TResult> func)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {
@ -79,10 +79,10 @@ namespace Acme.BookStore
protected virtual Task<TResult> WithUnitOfWorkAsync<TResult>(Func<Task<TResult>> func) protected virtual Task<TResult> WithUnitOfWorkAsync<TResult>(Func<Task<TResult>> func)
{ {
return WithUnitOfWorkAsync(new UnitOfWorkOptions(), func); return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func);
} }
protected virtual async Task<TResult> WithUnitOfWorkAsync<TResult>(UnitOfWorkOptions options, Func<Task<TResult>> func) protected virtual async Task<TResult> WithUnitOfWorkAsync<TResult>(AbpUnitOfWorkOptions options, Func<Task<TResult>> func)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {

@ -30,7 +30,7 @@ namespace Acme.BookStore
{ {
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.AddEmbedded<BookStoreDomainSharedModule>("Acme.BookStore"); options.FileSets.AddEmbedded<BookStoreDomainSharedModule>("Acme.BookStore");
}); });

@ -115,7 +115,7 @@ namespace Acme.BookStore.Web
{ {
if (hostingEnvironment.IsDevelopment()) if (hostingEnvironment.IsDevelopment())
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.ReplaceEmbeddedByPhysical<BookManagementWebModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}book-management{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}Acme.BookStore.BookManagement.Web")); options.FileSets.ReplaceEmbeddedByPhysical<BookManagementWebModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}book-management{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}Acme.BookStore.BookManagement.Web"));
options.FileSets.ReplaceEmbeddedByPhysical<BookStoreDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}Acme.BookStore.Domain.Shared")); options.FileSets.ReplaceEmbeddedByPhysical<BookStoreDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}Acme.BookStore.Domain.Shared"));

@ -19,10 +19,10 @@ namespace Acme.BookStore
protected virtual void WithUnitOfWork(Action action) protected virtual void WithUnitOfWork(Action action)
{ {
WithUnitOfWork(new UnitOfWorkOptions(), action); WithUnitOfWork(new AbpUnitOfWorkOptions(), action);
} }
protected virtual void WithUnitOfWork(UnitOfWorkOptions options, Action action) protected virtual void WithUnitOfWork(AbpUnitOfWorkOptions options, Action action)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {
@ -39,10 +39,10 @@ namespace Acme.BookStore
protected virtual Task WithUnitOfWorkAsync(Func<Task> func) protected virtual Task WithUnitOfWorkAsync(Func<Task> func)
{ {
return WithUnitOfWorkAsync(new UnitOfWorkOptions(), func); return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func);
} }
protected virtual async Task WithUnitOfWorkAsync(UnitOfWorkOptions options, Func<Task> action) protected virtual async Task WithUnitOfWorkAsync(AbpUnitOfWorkOptions options, Func<Task> action)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {
@ -59,10 +59,10 @@ namespace Acme.BookStore
protected virtual TResult WithUnitOfWork<TResult>(Func<TResult> func) protected virtual TResult WithUnitOfWork<TResult>(Func<TResult> func)
{ {
return WithUnitOfWork(new UnitOfWorkOptions(), func); return WithUnitOfWork(new AbpUnitOfWorkOptions(), func);
} }
protected virtual TResult WithUnitOfWork<TResult>(UnitOfWorkOptions options, Func<TResult> func) protected virtual TResult WithUnitOfWork<TResult>(AbpUnitOfWorkOptions options, Func<TResult> func)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {
@ -79,10 +79,10 @@ namespace Acme.BookStore
protected virtual Task<TResult> WithUnitOfWorkAsync<TResult>(Func<Task<TResult>> func) protected virtual Task<TResult> WithUnitOfWorkAsync<TResult>(Func<Task<TResult>> func)
{ {
return WithUnitOfWorkAsync(new UnitOfWorkOptions(), func); return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func);
} }
protected virtual async Task<TResult> WithUnitOfWorkAsync<TResult>(UnitOfWorkOptions options, Func<Task<TResult>> func) protected virtual async Task<TResult> WithUnitOfWorkAsync<TResult>(AbpUnitOfWorkOptions options, Func<Task<TResult>> func)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {

@ -54,7 +54,7 @@ namespace Acme.BookStore.BookManagement
if (hostingEnvironment.IsDevelopment()) if (hostingEnvironment.IsDevelopment())
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.ReplaceEmbeddedByPhysical<BookManagementDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Acme.BookStore.BookManagement.Domain.Shared", Path.DirectorySeparatorChar))); options.FileSets.ReplaceEmbeddedByPhysical<BookManagementDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Acme.BookStore.BookManagement.Domain.Shared", Path.DirectorySeparatorChar)));
options.FileSets.ReplaceEmbeddedByPhysical<BookManagementDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Acme.BookStore.BookManagement.Domain", Path.DirectorySeparatorChar))); options.FileSets.ReplaceEmbeddedByPhysical<BookManagementDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Acme.BookStore.BookManagement.Domain", Path.DirectorySeparatorChar)));

@ -153,7 +153,7 @@ namespace Acme.BookStore.BookManagement
{ {
if (hostingEnvironment.IsDevelopment()) if (hostingEnvironment.IsDevelopment())
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.ReplaceEmbeddedByPhysical<BookManagementDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Acme.BookStore.BookManagement.Domain", Path.DirectorySeparatorChar))); options.FileSets.ReplaceEmbeddedByPhysical<BookManagementDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Acme.BookStore.BookManagement.Domain", Path.DirectorySeparatorChar)));
options.FileSets.ReplaceEmbeddedByPhysical<BookManagementApplicationContractsModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Acme.BookStore.BookManagement.Application.Contracts", Path.DirectorySeparatorChar))); options.FileSets.ReplaceEmbeddedByPhysical<BookManagementApplicationContractsModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Acme.BookStore.BookManagement.Application.Contracts", Path.DirectorySeparatorChar)));

@ -68,7 +68,7 @@ namespace Acme.BookStore.BookManagement
if (hostingEnvironment.IsDevelopment()) if (hostingEnvironment.IsDevelopment())
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.ReplaceEmbeddedByPhysical<BookManagementDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Acme.BookStore.BookManagement.Domain.Shared", Path.DirectorySeparatorChar))); options.FileSets.ReplaceEmbeddedByPhysical<BookManagementDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Acme.BookStore.BookManagement.Domain.Shared", Path.DirectorySeparatorChar)));
options.FileSets.ReplaceEmbeddedByPhysical<BookManagementDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Acme.BookStore.BookManagement.Domain", Path.DirectorySeparatorChar))); options.FileSets.ReplaceEmbeddedByPhysical<BookManagementDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Acme.BookStore.BookManagement.Domain", Path.DirectorySeparatorChar)));

@ -12,7 +12,7 @@ namespace Acme.BookStore.BookManagement
{ {
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.AddEmbedded<BookManagementApplicationContractsModule>("Acme.BookStore.BookManagement"); options.FileSets.AddEmbedded<BookManagementApplicationContractsModule>("Acme.BookStore.BookManagement");
}); });

@ -14,7 +14,7 @@ namespace Acme.BookStore.BookManagement
{ {
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.AddEmbedded<BookManagementDomainSharedModule>("Acme.BookStore.BookManagement"); options.FileSets.AddEmbedded<BookManagementDomainSharedModule>("Acme.BookStore.BookManagement");
}); });

@ -32,7 +32,7 @@ namespace Acme.BookStore.BookManagement.Web
options.MenuContributors.Add(new BookManagementMenuContributor()); options.MenuContributors.Add(new BookManagementMenuContributor());
}); });
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.AddEmbedded<BookManagementWebModule>("Acme.BookStore.BookManagement.Web"); options.FileSets.AddEmbedded<BookManagementWebModule>("Acme.BookStore.BookManagement.Web");
}); });

@ -18,10 +18,10 @@ namespace Acme.BookStore.BookManagement
protected virtual void WithUnitOfWork(Action action) protected virtual void WithUnitOfWork(Action action)
{ {
WithUnitOfWork(new UnitOfWorkOptions(), action); WithUnitOfWork(new AbpUnitOfWorkOptions(), action);
} }
protected virtual void WithUnitOfWork(UnitOfWorkOptions options, Action action) protected virtual void WithUnitOfWork(AbpUnitOfWorkOptions options, Action action)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {
@ -38,10 +38,10 @@ namespace Acme.BookStore.BookManagement
protected virtual Task WithUnitOfWorkAsync(Func<Task> func) protected virtual Task WithUnitOfWorkAsync(Func<Task> func)
{ {
return WithUnitOfWorkAsync(new UnitOfWorkOptions(), func); return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func);
} }
protected virtual async Task WithUnitOfWorkAsync(UnitOfWorkOptions options, Func<Task> action) protected virtual async Task WithUnitOfWorkAsync(AbpUnitOfWorkOptions options, Func<Task> action)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {
@ -58,10 +58,10 @@ namespace Acme.BookStore.BookManagement
protected virtual TResult WithUnitOfWork<TResult>(Func<TResult> func) protected virtual TResult WithUnitOfWork<TResult>(Func<TResult> func)
{ {
return WithUnitOfWork(new UnitOfWorkOptions(), func); return WithUnitOfWork(new AbpUnitOfWorkOptions(), func);
} }
protected virtual TResult WithUnitOfWork<TResult>(UnitOfWorkOptions options, Func<TResult> func) protected virtual TResult WithUnitOfWork<TResult>(AbpUnitOfWorkOptions options, Func<TResult> func)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {
@ -78,10 +78,10 @@ namespace Acme.BookStore.BookManagement
protected virtual Task<TResult> WithUnitOfWorkAsync<TResult>(Func<Task<TResult>> func) protected virtual Task<TResult> WithUnitOfWorkAsync<TResult>(Func<Task<TResult>> func)
{ {
return WithUnitOfWorkAsync(new UnitOfWorkOptions(), func); return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func);
} }
protected virtual async Task<TResult> WithUnitOfWorkAsync<TResult>(UnitOfWorkOptions options, Func<Task<TResult>> func) protected virtual async Task<TResult> WithUnitOfWorkAsync<TResult>(AbpUnitOfWorkOptions options, Func<Task<TResult>> func)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {

@ -28,7 +28,7 @@ namespace Acme.BookStore
{ {
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.AddEmbedded<BookStoreDomainSharedModule>("Acme.BookStore"); options.FileSets.AddEmbedded<BookStoreDomainSharedModule>("Acme.BookStore");
}); });

@ -108,7 +108,7 @@ namespace Acme.BookStore.Web
{ {
if (hostingEnvironment.IsDevelopment()) if (hostingEnvironment.IsDevelopment())
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.ReplaceEmbeddedByPhysical<BookStoreDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}Acme.BookStore.Domain.Shared", Path.DirectorySeparatorChar))); options.FileSets.ReplaceEmbeddedByPhysical<BookStoreDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}Acme.BookStore.Domain.Shared", Path.DirectorySeparatorChar)));
options.FileSets.ReplaceEmbeddedByPhysical<BookStoreDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}Acme.BookStore.Domain", Path.DirectorySeparatorChar))); options.FileSets.ReplaceEmbeddedByPhysical<BookStoreDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}Acme.BookStore.Domain", Path.DirectorySeparatorChar)));

@ -19,10 +19,10 @@ namespace Acme.BookStore
protected virtual void WithUnitOfWork(Action action) protected virtual void WithUnitOfWork(Action action)
{ {
WithUnitOfWork(new UnitOfWorkOptions(), action); WithUnitOfWork(new AbpUnitOfWorkOptions(), action);
} }
protected virtual void WithUnitOfWork(UnitOfWorkOptions options, Action action) protected virtual void WithUnitOfWork(AbpUnitOfWorkOptions options, Action action)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {
@ -39,10 +39,10 @@ namespace Acme.BookStore
protected virtual Task WithUnitOfWorkAsync(Func<Task> func) protected virtual Task WithUnitOfWorkAsync(Func<Task> func)
{ {
return WithUnitOfWorkAsync(new UnitOfWorkOptions(), func); return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func);
} }
protected virtual async Task WithUnitOfWorkAsync(UnitOfWorkOptions options, Func<Task> action) protected virtual async Task WithUnitOfWorkAsync(AbpUnitOfWorkOptions options, Func<Task> action)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {
@ -59,10 +59,10 @@ namespace Acme.BookStore
protected virtual TResult WithUnitOfWork<TResult>(Func<TResult> func) protected virtual TResult WithUnitOfWork<TResult>(Func<TResult> func)
{ {
return WithUnitOfWork(new UnitOfWorkOptions(), func); return WithUnitOfWork(new AbpUnitOfWorkOptions(), func);
} }
protected virtual TResult WithUnitOfWork<TResult>(UnitOfWorkOptions options, Func<TResult> func) protected virtual TResult WithUnitOfWork<TResult>(AbpUnitOfWorkOptions options, Func<TResult> func)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {
@ -79,10 +79,10 @@ namespace Acme.BookStore
protected virtual Task<TResult> WithUnitOfWorkAsync<TResult>(Func<Task<TResult>> func) protected virtual Task<TResult> WithUnitOfWorkAsync<TResult>(Func<Task<TResult>> func)
{ {
return WithUnitOfWorkAsync(new UnitOfWorkOptions(), func); return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func);
} }
protected virtual async Task<TResult> WithUnitOfWorkAsync<TResult>(UnitOfWorkOptions options, Func<Task<TResult>> func) protected virtual async Task<TResult> WithUnitOfWorkAsync<TResult>(AbpUnitOfWorkOptions options, Func<Task<TResult>> func)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {

@ -28,7 +28,7 @@ namespace DashboardDemo
{ {
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.AddEmbedded<DashboardDemoDomainSharedModule>("DashboardDemo"); options.FileSets.AddEmbedded<DashboardDemoDomainSharedModule>("DashboardDemo");
}); });

@ -114,7 +114,7 @@ namespace DashboardDemo.Web
{ {
if (hostingEnvironment.IsDevelopment()) if (hostingEnvironment.IsDevelopment())
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.ReplaceEmbeddedByPhysical<AbpAspNetCoreMvcUiThemeSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared", Path.DirectorySeparatorChar))); options.FileSets.ReplaceEmbeddedByPhysical<AbpAspNetCoreMvcUiThemeSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared", Path.DirectorySeparatorChar)));
options.FileSets.ReplaceEmbeddedByPhysical<DashboardDemoDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}DashboardDemo.Domain.Shared", Path.DirectorySeparatorChar))); options.FileSets.ReplaceEmbeddedByPhysical<DashboardDemoDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}DashboardDemo.Domain.Shared", Path.DirectorySeparatorChar)));

@ -19,10 +19,10 @@ namespace DashboardDemo
protected virtual void WithUnitOfWork(Action action) protected virtual void WithUnitOfWork(Action action)
{ {
WithUnitOfWork(new UnitOfWorkOptions(), action); WithUnitOfWork(new AbpUnitOfWorkOptions(), action);
} }
protected virtual void WithUnitOfWork(UnitOfWorkOptions options, Action action) protected virtual void WithUnitOfWork(AbpUnitOfWorkOptions options, Action action)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {
@ -39,10 +39,10 @@ namespace DashboardDemo
protected virtual Task WithUnitOfWorkAsync(Func<Task> func) protected virtual Task WithUnitOfWorkAsync(Func<Task> func)
{ {
return WithUnitOfWorkAsync(new UnitOfWorkOptions(), func); return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func);
} }
protected virtual async Task WithUnitOfWorkAsync(UnitOfWorkOptions options, Func<Task> action) protected virtual async Task WithUnitOfWorkAsync(AbpUnitOfWorkOptions options, Func<Task> action)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {
@ -59,10 +59,10 @@ namespace DashboardDemo
protected virtual TResult WithUnitOfWork<TResult>(Func<TResult> func) protected virtual TResult WithUnitOfWork<TResult>(Func<TResult> func)
{ {
return WithUnitOfWork(new UnitOfWorkOptions(), func); return WithUnitOfWork(new AbpUnitOfWorkOptions(), func);
} }
protected virtual TResult WithUnitOfWork<TResult>(UnitOfWorkOptions options, Func<TResult> func) protected virtual TResult WithUnitOfWork<TResult>(AbpUnitOfWorkOptions options, Func<TResult> func)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {
@ -79,10 +79,10 @@ namespace DashboardDemo
protected virtual Task<TResult> WithUnitOfWorkAsync<TResult>(Func<Task<TResult>> func) protected virtual Task<TResult> WithUnitOfWorkAsync<TResult>(Func<Task<TResult>> func)
{ {
return WithUnitOfWorkAsync(new UnitOfWorkOptions(), func); return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func);
} }
protected virtual async Task<TResult> WithUnitOfWorkAsync<TResult>(UnitOfWorkOptions options, Func<Task<TResult>> func) protected virtual async Task<TResult> WithUnitOfWorkAsync<TResult>(AbpUnitOfWorkOptions options, Func<Task<TResult>> func)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {

@ -16,7 +16,7 @@ namespace ProductManagement
{ {
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.AddEmbedded<ProductManagementApplicationContractsModule>(); options.FileSets.AddEmbedded<ProductManagementApplicationContractsModule>();
}); });

@ -18,7 +18,7 @@ namespace ProductManagement
{ {
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.AddEmbedded<ProductManagementDomainModule>(); options.FileSets.AddEmbedded<ProductManagementDomainModule>();
}); });

@ -33,7 +33,7 @@ namespace ProductManagement
options.MenuContributors.Add(new ProductManagementMenuContributor()); options.MenuContributors.Add(new ProductManagementMenuContributor());
}); });
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.AddEmbedded<ProductManagementWebModule>("ProductManagement"); options.FileSets.AddEmbedded<ProductManagementWebModule>("ProductManagement");
}); });

@ -11,10 +11,10 @@ namespace ProductManagement
protected virtual void WithUnitOfWork(Action action) protected virtual void WithUnitOfWork(Action action)
{ {
WithUnitOfWork(new UnitOfWorkOptions(), action); WithUnitOfWork(new AbpUnitOfWorkOptions(), action);
} }
protected virtual void WithUnitOfWork(UnitOfWorkOptions options, Action action) protected virtual void WithUnitOfWork(AbpUnitOfWorkOptions options, Action action)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {
@ -31,10 +31,10 @@ namespace ProductManagement
protected virtual Task WithUnitOfWorkAsync(Func<Task> func) protected virtual Task WithUnitOfWorkAsync(Func<Task> func)
{ {
return WithUnitOfWorkAsync(new UnitOfWorkOptions(), func); return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func);
} }
protected virtual async Task WithUnitOfWorkAsync(UnitOfWorkOptions options, Func<Task> action) protected virtual async Task WithUnitOfWorkAsync(AbpUnitOfWorkOptions options, Func<Task> action)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {
@ -51,10 +51,10 @@ namespace ProductManagement
protected virtual TResult WithUnitOfWork<TResult>(Func<TResult> func) protected virtual TResult WithUnitOfWork<TResult>(Func<TResult> func)
{ {
return WithUnitOfWork(new UnitOfWorkOptions(), func); return WithUnitOfWork(new AbpUnitOfWorkOptions(), func);
} }
protected virtual TResult WithUnitOfWork<TResult>(UnitOfWorkOptions options, Func<TResult> func) protected virtual TResult WithUnitOfWork<TResult>(AbpUnitOfWorkOptions options, Func<TResult> func)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {
@ -71,10 +71,10 @@ namespace ProductManagement
protected virtual Task<TResult> WithUnitOfWorkAsync<TResult>(Func<Task<TResult>> func) protected virtual Task<TResult> WithUnitOfWorkAsync<TResult>(Func<Task<TResult>> func)
{ {
return WithUnitOfWorkAsync(new UnitOfWorkOptions(), func); return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func);
} }
protected virtual async Task<TResult> WithUnitOfWorkAsync<TResult>(UnitOfWorkOptions options, Func<Task<TResult>> func) protected virtual async Task<TResult> WithUnitOfWorkAsync<TResult>(AbpUnitOfWorkOptions options, Func<Task<TResult>> func)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {

@ -28,7 +28,7 @@ namespace MyCompanyName.MyProjectName
{ {
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.AddEmbedded<MyProjectNameDomainSharedModule>("MyCompanyName.MyProjectName"); options.FileSets.AddEmbedded<MyProjectNameDomainSharedModule>("MyCompanyName.MyProjectName");
}); });

@ -67,7 +67,7 @@ namespace MyCompanyName.MyProjectName
if (hostingEnvironment.IsDevelopment()) if (hostingEnvironment.IsDevelopment())
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.ReplaceEmbeddedByPhysical<MyProjectNameDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}MyCompanyName.MyProjectName.Domain.Shared")); options.FileSets.ReplaceEmbeddedByPhysical<MyProjectNameDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}MyCompanyName.MyProjectName.Domain.Shared"));
options.FileSets.ReplaceEmbeddedByPhysical<MyProjectNameDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}MyCompanyName.MyProjectName.Domain")); options.FileSets.ReplaceEmbeddedByPhysical<MyProjectNameDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}MyCompanyName.MyProjectName.Domain"));

@ -69,7 +69,7 @@ namespace MyCompanyName.MyProjectName
if (hostingEnvironment.IsDevelopment()) if (hostingEnvironment.IsDevelopment())
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.ReplaceEmbeddedByPhysical<MyProjectNameDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}MyCompanyName.MyProjectName.Domain.Shared")); options.FileSets.ReplaceEmbeddedByPhysical<MyProjectNameDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}MyCompanyName.MyProjectName.Domain.Shared"));
options.FileSets.ReplaceEmbeddedByPhysical<MyProjectNameDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}MyCompanyName.MyProjectName.Domain")); options.FileSets.ReplaceEmbeddedByPhysical<MyProjectNameDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}MyCompanyName.MyProjectName.Domain"));

@ -69,7 +69,7 @@ namespace MyCompanyName.MyProjectName
if (hostingEnvironment.IsDevelopment()) if (hostingEnvironment.IsDevelopment())
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.ReplaceEmbeddedByPhysical<MyProjectNameDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}MyCompanyName.MyProjectName.Domain.Shared")); options.FileSets.ReplaceEmbeddedByPhysical<MyProjectNameDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}MyCompanyName.MyProjectName.Domain.Shared"));
options.FileSets.ReplaceEmbeddedByPhysical<MyProjectNameDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}MyCompanyName.MyProjectName.Domain")); options.FileSets.ReplaceEmbeddedByPhysical<MyProjectNameDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}MyCompanyName.MyProjectName.Domain"));

@ -151,7 +151,7 @@ namespace MyCompanyName.MyProjectName.Web
{ {
if (hostingEnvironment.IsDevelopment()) if (hostingEnvironment.IsDevelopment())
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
//<TEMPLATE-REMOVE> //<TEMPLATE-REMOVE>
options.FileSets.ReplaceEmbeddedByPhysical<AbpUiModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.UI", Path.DirectorySeparatorChar))); options.FileSets.ReplaceEmbeddedByPhysical<AbpUiModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.UI", Path.DirectorySeparatorChar)));

@ -115,7 +115,7 @@ namespace MyCompanyName.MyProjectName.Web
{ {
if (hostingEnvironment.IsDevelopment()) if (hostingEnvironment.IsDevelopment())
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
//<TEMPLATE-REMOVE> //<TEMPLATE-REMOVE>
options.FileSets.ReplaceEmbeddedByPhysical<AbpUiModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.UI", Path.DirectorySeparatorChar))); options.FileSets.ReplaceEmbeddedByPhysical<AbpUiModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.UI", Path.DirectorySeparatorChar)));

@ -19,10 +19,10 @@ namespace MyCompanyName.MyProjectName
protected virtual void WithUnitOfWork(Action action) protected virtual void WithUnitOfWork(Action action)
{ {
WithUnitOfWork(new UnitOfWorkOptions(), action); WithUnitOfWork(new AbpUnitOfWorkOptions(), action);
} }
protected virtual void WithUnitOfWork(UnitOfWorkOptions options, Action action) protected virtual void WithUnitOfWork(AbpUnitOfWorkOptions options, Action action)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {
@ -39,10 +39,10 @@ namespace MyCompanyName.MyProjectName
protected virtual Task WithUnitOfWorkAsync(Func<Task> func) protected virtual Task WithUnitOfWorkAsync(Func<Task> func)
{ {
return WithUnitOfWorkAsync(new UnitOfWorkOptions(), func); return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func);
} }
protected virtual async Task WithUnitOfWorkAsync(UnitOfWorkOptions options, Func<Task> action) protected virtual async Task WithUnitOfWorkAsync(AbpUnitOfWorkOptions options, Func<Task> action)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {
@ -59,10 +59,10 @@ namespace MyCompanyName.MyProjectName
protected virtual TResult WithUnitOfWork<TResult>(Func<TResult> func) protected virtual TResult WithUnitOfWork<TResult>(Func<TResult> func)
{ {
return WithUnitOfWork(new UnitOfWorkOptions(), func); return WithUnitOfWork(new AbpUnitOfWorkOptions(), func);
} }
protected virtual TResult WithUnitOfWork<TResult>(UnitOfWorkOptions options, Func<TResult> func) protected virtual TResult WithUnitOfWork<TResult>(AbpUnitOfWorkOptions options, Func<TResult> func)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {
@ -79,10 +79,10 @@ namespace MyCompanyName.MyProjectName
protected virtual Task<TResult> WithUnitOfWorkAsync<TResult>(Func<Task<TResult>> func) protected virtual Task<TResult> WithUnitOfWorkAsync<TResult>(Func<Task<TResult>> func)
{ {
return WithUnitOfWorkAsync(new UnitOfWorkOptions(), func); return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func);
} }
protected virtual async Task<TResult> WithUnitOfWorkAsync<TResult>(UnitOfWorkOptions options, Func<Task<TResult>> func) protected virtual async Task<TResult> WithUnitOfWorkAsync<TResult>(AbpUnitOfWorkOptions options, Func<Task<TResult>> func)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {

@ -53,7 +53,7 @@ namespace MyCompanyName.MyProjectName
if (hostingEnvironment.IsDevelopment()) if (hostingEnvironment.IsDevelopment())
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.ReplaceEmbeddedByPhysical<MyProjectNameDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}MyCompanyName.MyProjectName.Domain.Shared", Path.DirectorySeparatorChar))); options.FileSets.ReplaceEmbeddedByPhysical<MyProjectNameDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}MyCompanyName.MyProjectName.Domain.Shared", Path.DirectorySeparatorChar)));
options.FileSets.ReplaceEmbeddedByPhysical<MyProjectNameDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}MyCompanyName.MyProjectName.Domain", Path.DirectorySeparatorChar))); options.FileSets.ReplaceEmbeddedByPhysical<MyProjectNameDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}MyCompanyName.MyProjectName.Domain", Path.DirectorySeparatorChar)));

@ -153,7 +153,7 @@ namespace MyCompanyName.MyProjectName
{ {
if (hostingEnvironment.IsDevelopment()) if (hostingEnvironment.IsDevelopment())
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
//<TEMPLATE-REMOVE> //<TEMPLATE-REMOVE>
options.FileSets.ReplaceEmbeddedByPhysical<AbpUiModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.UI", Path.DirectorySeparatorChar))); options.FileSets.ReplaceEmbeddedByPhysical<AbpUiModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.UI", Path.DirectorySeparatorChar)));

@ -67,7 +67,7 @@ namespace MyCompanyName.MyProjectName
if (hostingEnvironment.IsDevelopment()) if (hostingEnvironment.IsDevelopment())
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.ReplaceEmbeddedByPhysical<MyProjectNameDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}MyCompanyName.MyProjectName.Domain.Shared", Path.DirectorySeparatorChar))); options.FileSets.ReplaceEmbeddedByPhysical<MyProjectNameDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}MyCompanyName.MyProjectName.Domain.Shared", Path.DirectorySeparatorChar)));
options.FileSets.ReplaceEmbeddedByPhysical<MyProjectNameDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}MyCompanyName.MyProjectName.Domain", Path.DirectorySeparatorChar))); options.FileSets.ReplaceEmbeddedByPhysical<MyProjectNameDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}MyCompanyName.MyProjectName.Domain", Path.DirectorySeparatorChar)));

@ -14,7 +14,7 @@ namespace MyCompanyName.MyProjectName
{ {
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.AddEmbedded<MyProjectNameApplicationContractsModule>("MyCompanyName.MyProjectName"); options.FileSets.AddEmbedded<MyProjectNameApplicationContractsModule>("MyCompanyName.MyProjectName");
}); });

@ -14,7 +14,7 @@ namespace MyCompanyName.MyProjectName
{ {
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.AddEmbedded<MyProjectNameDomainSharedModule>("MyCompanyName.MyProjectName"); options.FileSets.AddEmbedded<MyProjectNameDomainSharedModule>("MyCompanyName.MyProjectName");
}); });

@ -37,7 +37,7 @@ namespace MyCompanyName.MyProjectName.Web
options.MenuContributors.Add(new MyProjectNameMenuContributor()); options.MenuContributors.Add(new MyProjectNameMenuContributor());
}); });
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.AddEmbedded<MyProjectNameWebModule>("MyCompanyName.MyProjectName.Web"); options.FileSets.AddEmbedded<MyProjectNameWebModule>("MyCompanyName.MyProjectName.Web");
}); });

@ -18,10 +18,10 @@ namespace MyCompanyName.MyProjectName
protected virtual void WithUnitOfWork(Action action) protected virtual void WithUnitOfWork(Action action)
{ {
WithUnitOfWork(new UnitOfWorkOptions(), action); WithUnitOfWork(new AbpUnitOfWorkOptions(), action);
} }
protected virtual void WithUnitOfWork(UnitOfWorkOptions options, Action action) protected virtual void WithUnitOfWork(AbpUnitOfWorkOptions options, Action action)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {
@ -38,10 +38,10 @@ namespace MyCompanyName.MyProjectName
protected virtual Task WithUnitOfWorkAsync(Func<Task> func) protected virtual Task WithUnitOfWorkAsync(Func<Task> func)
{ {
return WithUnitOfWorkAsync(new UnitOfWorkOptions(), func); return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func);
} }
protected virtual async Task WithUnitOfWorkAsync(UnitOfWorkOptions options, Func<Task> action) protected virtual async Task WithUnitOfWorkAsync(AbpUnitOfWorkOptions options, Func<Task> action)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {
@ -58,10 +58,10 @@ namespace MyCompanyName.MyProjectName
protected virtual TResult WithUnitOfWork<TResult>(Func<TResult> func) protected virtual TResult WithUnitOfWork<TResult>(Func<TResult> func)
{ {
return WithUnitOfWork(new UnitOfWorkOptions(), func); return WithUnitOfWork(new AbpUnitOfWorkOptions(), func);
} }
protected virtual TResult WithUnitOfWork<TResult>(UnitOfWorkOptions options, Func<TResult> func) protected virtual TResult WithUnitOfWork<TResult>(AbpUnitOfWorkOptions options, Func<TResult> func)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {
@ -78,10 +78,10 @@ namespace MyCompanyName.MyProjectName
protected virtual Task<TResult> WithUnitOfWorkAsync<TResult>(Func<Task<TResult>> func) protected virtual Task<TResult> WithUnitOfWorkAsync<TResult>(Func<Task<TResult>> func)
{ {
return WithUnitOfWorkAsync(new UnitOfWorkOptions(), func); return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func);
} }
protected virtual async Task<TResult> WithUnitOfWorkAsync<TResult>(UnitOfWorkOptions options, Func<Task<TResult>> func) protected virtual async Task<TResult> WithUnitOfWorkAsync<TResult>(AbpUnitOfWorkOptions options, Func<Task<TResult>> func)
{ {
using (var scope = ServiceProvider.CreateScope()) using (var scope = ServiceProvider.CreateScope())
{ {

Loading…
Cancel
Save