acme.bookstrore sample upgraded to abp 0.3.7

pull/395/head
Yunus Emre Kalkan 7 years ago
parent f7010cb002
commit 0bba783e9b

@ -7,7 +7,7 @@
<ItemGroup>
<ProjectReference Include="..\Acme.BookStore.Domain\Acme.BookStore.Domain.csproj" />
<PackageReference Include="Volo.Abp.Identity.Application" Version="0.3.5" />
<PackageReference Include="Volo.Abp.Identity.Application" Version="0.3.7" />
</ItemGroup>
</Project>

@ -12,19 +12,19 @@ namespace Acme.BookStore
typeof(AbpIdentityApplicationModule))]
public class BookStoreApplicationModule : AbpModule
{
public override void ConfigureServices(IServiceCollection services)
public override void ConfigureServices(ServiceConfigurationContext context)
{
services.Configure<PermissionOptions>(options =>
context.Services.Configure<PermissionOptions>(options =>
{
options.DefinitionProviders.Add<BookStorePermissionDefinitionProvider>();
});
services.Configure<AbpAutoMapperOptions>(options =>
context.Services.Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<BookStoreApplicationAutoMapperProfile>();
});
services.AddAssemblyOf<BookStoreApplicationModule>();
context.Services.AddAssemblyOf<BookStoreApplicationModule>();
}
}
}

@ -6,7 +6,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Identity.Domain" Version="0.3.5" />
<PackageReference Include="Volo.Abp.Identity.Domain" Version="0.3.7" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.DataAnnotations" Version="2.1.1" />
</ItemGroup>

@ -13,14 +13,14 @@ namespace Acme.BookStore
[DependsOn(typeof(AbpIdentityDomainModule))]
public class BookStoreDomainModule : AbpModule
{
public override void ConfigureServices(IServiceCollection services)
public override void ConfigureServices(ServiceConfigurationContext context)
{
services.Configure<VirtualFileSystemOptions>(options =>
context.Services.Configure<VirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<BookStoreDomainModule>();
});
services.Configure<AbpLocalizationOptions>(options =>
context.Services.Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Add<BookStoreResource>("en")
@ -28,12 +28,12 @@ namespace Acme.BookStore
.AddVirtualJson("/Localization/BookStore");
});
services.Configure<SettingOptions>(options =>
context.Services.Configure<SettingOptions>(options =>
{
options.DefinitionProviders.Add<BookStoreSettingDefinitionProvider>();
});
services.AddAssemblyOf<BookStoreDomainModule>();
context.Services.AddAssemblyOf<BookStoreDomainModule>();
}
}
}

@ -12,10 +12,10 @@
<ItemGroup>
<ProjectReference Include="..\Acme.BookStore.Domain\Acme.BookStore.Domain.csproj" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="0.3.5" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="0.3.5" />
<PackageReference Include="Volo.Abp.Identity.EntityFrameworkCore" Version="0.3.5" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.SqlServer" Version="0.3.5" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="0.3.7" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="0.3.7" />
<PackageReference Include="Volo.Abp.Identity.EntityFrameworkCore" Version="0.3.7" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.SqlServer" Version="0.3.7" />
</ItemGroup>
</Project>

@ -15,14 +15,14 @@ namespace Acme.BookStore.EntityFrameworkCore
typeof(AbpEntityFrameworkCoreSqlServerModule))]
public class BookStoreEntityFrameworkCoreModule : AbpModule
{
public override void ConfigureServices(IServiceCollection services)
public override void ConfigureServices(ServiceConfigurationContext context)
{
services.AddAbpDbContext<BookStoreDbContext>(options =>
context.Services.AddAbpDbContext<BookStoreDbContext>(options =>
{
options.AddDefaultRepositories();
});
services.AddAssemblyOf<BookStoreEntityFrameworkCoreModule>();
context.Services.AddAssemblyOf<BookStoreEntityFrameworkCoreModule>();
}
}
}

@ -27,10 +27,10 @@
<ItemGroup>
<ProjectReference Include="..\Acme.BookStore.Application\Acme.BookStore.Application.csproj" />
<ProjectReference Include="..\Acme.BookStore.EntityFrameworkCore\Acme.BookStore.EntityFrameworkCore.csproj" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic" Version="0.3.5" />
<PackageReference Include="Volo.Abp.Autofac" Version="0.3.5" />
<PackageReference Include="Volo.Abp.Identity.Web" Version="0.3.5" />
<PackageReference Include="Volo.Abp.Account.Web" Version="0.3.5" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic" Version="0.3.7" />
<PackageReference Include="Volo.Abp.Autofac" Version="0.3.7" />
<PackageReference Include="Volo.Abp.Identity.Web" Version="0.3.7" />
<PackageReference Include="Volo.Abp.Account.Web" Version="0.3.7" />
</ItemGroup>
</Project>

@ -48,9 +48,9 @@ namespace Acme.BookStore
)]
public class BookStoreWebModule : AbpModule
{
public override void PreConfigureServices(IServiceCollection services)
public override void PreConfigureServices(ServiceConfigurationContext context)
{
services.PreConfigure<AbpMvcDataAnnotationsLocalizationOptions>(options =>
context.Services.PreConfigure<AbpMvcDataAnnotationsLocalizationOptions>(options =>
{
options.AddAssemblyResource(
typeof(BookStoreResource),
@ -61,20 +61,20 @@ namespace Acme.BookStore
});
}
public override void ConfigureServices(IServiceCollection services)
public override void ConfigureServices(ServiceConfigurationContext context)
{
var hostingEnvironment = services.GetHostingEnvironment();
var configuration = services.BuildConfiguration();
ConfigureDatabaseServices(services, configuration);
ConfigureAutoMapper(services);
ConfigureVirtualFileSystem(services, hostingEnvironment);
ConfigureLocalizationServices(services);
ConfigureNavigationServices(services);
ConfigureAutoApiControllers(services);
ConfigureSwaggerServices(services);
services.AddAssemblyOf<BookStoreWebModule>();
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.BuildConfiguration();
ConfigureDatabaseServices(context.Services, configuration);
ConfigureAutoMapper(context.Services);
ConfigureVirtualFileSystem(context.Services, hostingEnvironment);
ConfigureLocalizationServices(context.Services);
ConfigureNavigationServices(context.Services);
ConfigureAutoApiControllers(context.Services);
ConfigureSwaggerServices(context.Services);
context.Services.AddAssemblyOf<BookStoreWebModule>();
}
private static void ConfigureDatabaseServices(IServiceCollection services, IConfigurationRoot configuration)

@ -8,8 +8,8 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Acme.BookStore.Application\Acme.BookStore.Application.csproj" />
<ProjectReference Include="..\..\src\Acme.BookStore.EntityFrameworkCore\Acme.BookStore.EntityFrameworkCore.csproj" />
<PackageReference Include="Volo.Abp.TestBase" Version="0.3.5" />
<PackageReference Include="Volo.Abp.Autofac" Version="0.3.5" />
<PackageReference Include="Volo.Abp.TestBase" Version="0.3.7" />
<PackageReference Include="Volo.Abp.Autofac" Version="0.3.7" />
</ItemGroup>
<ItemGroup>

@ -21,13 +21,13 @@ namespace Acme.BookStore
{
private SqliteConnection _sqliteConnection;
public override void ConfigureServices(IServiceCollection services)
public override void ConfigureServices(ServiceConfigurationContext context)
{
services.AddAlwaysAllowAuthorization();
context.Services.AddAlwaysAllowAuthorization();
ConfigureInMemorySqlite(services);
ConfigureInMemorySqlite(context.Services);
services.AddAssemblyOf<BookStoreApplicationTestModule>();
context.Services.AddAssemblyOf<BookStoreApplicationTestModule>();
}
private void ConfigureInMemorySqlite(IServiceCollection services)

@ -15,7 +15,7 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.2" />
<ProjectReference Include="..\Acme.BookStore.Application.Tests\Acme.BookStore.Application.Tests.csproj" />
<ProjectReference Include="..\..\src\Acme.BookStore.Web\Acme.BookStore.Web.csproj" />
<PackageReference Include="Volo.Abp.AspNetCore.TestBase" Version="0.3.5" />
<PackageReference Include="Volo.Abp.AspNetCore.TestBase" Version="0.3.7" />
</ItemGroup>
<ItemGroup>

@ -32,20 +32,20 @@ namespace Acme.BookStore
)]
public class BookStoreWebTestModule : AbpModule
{
public override void PreConfigureServices(IServiceCollection services)
public override void PreConfigureServices(ServiceConfigurationContext context)
{
services.PreConfigure<IMvcBuilder>(builder =>
context.Services.PreConfigure<IMvcBuilder>(builder =>
{
builder.PartManager.ApplicationParts.Add(new AssemblyPart(typeof(BookStoreWebModule).Assembly));
});
}
public override void ConfigureServices(IServiceCollection services)
public override void ConfigureServices(ServiceConfigurationContext context)
{
ConfigureLocalizationServices(services);
ConfigureNavigationServices(services);
ConfigureLocalizationServices(context.Services);
ConfigureNavigationServices(context.Services);
services.AddAssemblyOf<BookStoreWebTestModule>();
context.Services.AddAssemblyOf<BookStoreWebTestModule>();
}
private static void ConfigureLocalizationServices(IServiceCollection services)

Loading…
Cancel
Save