Skip to content

Commit

Permalink
Upgraded to ABP v0.13.
Browse files Browse the repository at this point in the history
  • Loading branch information
hikalkan committed Jan 27, 2019
1 parent 759dd0b commit 14b0896
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

<ItemGroup>
<ProjectReference Include="..\Acme.BookStore.Domain\Acme.BookStore.Domain.csproj" />
<PackageReference Include="Volo.Abp.Identity.Application" Version="0.12.0" />
<PackageReference Include="Volo.Abp.Identity.Application" Version="0.13.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.Application" Version="0.13.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
using Volo.Abp.AutoMapper;
using Volo.Abp.Identity;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement;

namespace Acme.BookStore
{
[DependsOn(
typeof(BookStoreDomainModule),
typeof(AbpIdentityApplicationModule))]
typeof(AbpIdentityApplicationModule),
typeof(AbpPermissionManagementApplicationModule))]
public class BookStoreApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Volo.Abp.Identity.Domain" Version="0.12.0" />
<PackageReference Include="Volo.Abp.Identity.Domain" Version="0.13.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.Identity" Version="0.13.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.DataAnnotations" Version="2.2.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@
using Volo.Abp.Localization;
using Volo.Abp.Localization.Resources.AbpValidation;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.Identity;
using Volo.Abp.Settings;
using Volo.Abp.VirtualFileSystem;

namespace Acme.BookStore
{
[DependsOn(typeof(AbpIdentityDomainModule))]
[DependsOn(
typeof(AbpIdentityDomainModule),
typeof(AbpPermissionManagementDomainIdentityModule))]
public class BookStoreDomainModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,12 @@
<RootNamespace>Acme.BookStore</RootNamespace>
</PropertyGroup>

<ItemGroup>
<Compile Remove="Migrations\20180528221424_Initial.cs" />
<Compile Remove="Migrations\20180703184727_Created_Book_Entity.cs" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Acme.BookStore.Domain\Acme.BookStore.Domain.csproj" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="0.12.0" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="0.12.0" />
<PackageReference Include="Volo.Abp.Identity.EntityFrameworkCore" Version="0.12.0" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.SqlServer" Version="0.12.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="0.13.0" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="0.13.0" />
<PackageReference Include="Volo.Abp.Identity.EntityFrameworkCore" Version="0.13.0" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.SqlServer" Version="0.13.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -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.12.0" />
<PackageReference Include="Volo.Abp.Autofac" Version="0.12.0" />
<PackageReference Include="Volo.Abp.Identity.Web" Version="0.12.0" />
<PackageReference Include="Volo.Abp.Account.Web" Version="0.12.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic" Version="0.13.0" />
<PackageReference Include="Volo.Abp.Autofac" Version="0.13.0" />
<PackageReference Include="Volo.Abp.Identity.Web" Version="0.13.0" />
<PackageReference Include="Volo.Abp.Account.Web" Version="0.13.0" />
</ItemGroup>

</Project>
29 changes: 20 additions & 9 deletions samples/BookStore/src/Acme.BookStore.Web/BookStoreWebModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
using Swashbuckle.AspNetCore.Swagger;
using Volo.Abp;
using Volo.Abp.Account.Web;
using Volo.Abp.AspNetCore.Modularity;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.Localization;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Autofac;
using Volo.Abp.AutoMapper;
using Volo.Abp.EntityFrameworkCore;
Expand All @@ -22,6 +22,7 @@
using Volo.Abp.Localization;
using Volo.Abp.Localization.Resources.AbpValidation;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement;
using Volo.Abp.Threading;
using Volo.Abp.UI.Navigation;
using Volo.Abp.VirtualFileSystem;
Expand Down Expand Up @@ -180,15 +181,25 @@ public override void OnApplicationInitialization(ApplicationInitializationContex

private void SeedDatabase(ApplicationInitializationContext context)
{
AsyncHelper.RunSync(async () =>
using (var scope = context.ServiceProvider.CreateScope())
{
await context.ServiceProvider
.GetRequiredService<IIdentityDataSeeder>()
.SeedAsync(
"1q2w3E*",
IdentityPermissions.GetAll() //.Union(BookStorePermissions.GetAll())
);
});
AsyncHelper.RunSync(async () =>
{
await scope.ServiceProvider
.GetRequiredService<IIdentityDataSeeder>()
.SeedAsync(
"1q2w3E*"
);

await scope.ServiceProvider
.GetRequiredService<IPermissionDataSeeder>()
.SeedAsync(
RolePermissionValueProvider.ProviderName,
"admin",
IdentityPermissions.GetAll() //.Union(BookStorePermissions.GetAll())
);
});
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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.12.0" />
<PackageReference Include="Volo.Abp.Autofac" Version="0.12.0" />
<PackageReference Include="Volo.Abp.TestBase" Version="0.13.0" />
<PackageReference Include="Volo.Abp.Autofac" Version="0.13.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Volo.Abp.Autofac" Version="0.12.0" />
<PackageReference Include="Volo.Abp.Http.Client" Version="0.12.0" />
<PackageReference Include="Volo.Abp.Autofac" Version="0.13.0" />
<PackageReference Include="Volo.Abp.Http.Client" Version="0.13.0" />
<ProjectReference Include="..\..\src\Acme.BookStore.Application\Acme.BookStore.Application.csproj" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<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.12.0" />
<PackageReference Include="Volo.Abp.AspNetCore.TestBase" Version="0.13.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Localization;
using Microsoft.AspNetCore.Mvc.ApplicationParts;
using Microsoft.AspNetCore.Mvc.Internal;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Acme.BookStore.Localization.BookStore;
using Acme.BookStore.Menus;
using Volo.Abp;
using Volo.Abp.Account.Web;
using Volo.Abp.AspNetCore.Modularity;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared;
using Volo.Abp.AspNetCore.TestBase;
using Volo.Abp.Identity.Web;
using Volo.Abp.Localization;
Expand Down

0 comments on commit 14b0896

Please sign in to comment.