From ed93f07b82049a4867b2cd68590f9007f6d7c747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Tue, 19 Jul 2016 11:33:59 +0300 Subject: [PATCH] Upgraded to ABP v0.10. --- .../EventCloud.Application.csproj | 23 +- .../Events/Dtos/CreateEventInput.cs | 3 +- .../Events/Dtos/EventDetailOutput.cs | 2 +- .../Events/Dtos/EventRegisterOutput.cs | 4 +- .../Events/Dtos/GetEventListInput.cs | 6 +- .../Roles/Dto/UpdateRolePermissionsInput.cs | 3 +- .../Dto/GetCurrentLoginInformationsOutput.cs | 6 +- .../Users/Dto/ProhibitPermissionInput.cs | 3 +- src/EventCloud.Application/packages.config | 10 +- .../Authorization/Roles/Role.cs | 3 +- .../Authorization/Roles/RoleManager.cs | 10 +- .../Authorization/Roles/RoleStore.cs | 3 +- .../Editions/EditionManager.cs | 5 +- src/EventCloud.Core/EventCloud.Core.csproj | 19 +- .../Features/FeatureValueStore.cs | 20 +- src/EventCloud.Core/MultiTenancy/Tenant.cs | 2 +- .../MultiTenancy/TenantManager.cs | 11 +- src/EventCloud.Core/Users/User.cs | 3 +- src/EventCloud.Core/Users/UserManager.cs | 6 +- src/EventCloud.Core/Users/UserStore.cs | 3 +- src/EventCloud.Core/packages.config | 8 +- .../EventCloud.EntityFramework.csproj | 42 +- ...808209_Upgraded_To_Abp_v0_10_0.Designer.cs | 29 ++ ...201607190808209_Upgraded_To_Abp_v0_10_0.cs | 492 ++++++++++++++++++ ...1607190808209_Upgraded_To_Abp_v0_10_0.resx | 126 +++++ .../DefaultTenantRoleAndUserBuilder.cs | 4 +- .../packages.config | 15 +- .../Abp/Framework/scripts/abp.js | 133 ++++- .../Abp/Framework/scripts/libs/abp.jquery.js | 80 ++- .../Abp/Framework/scripts/libs/abp.moment.js | 19 + .../Framework/scripts/libs/abp.sweet-alert.js | 2 +- .../scripts/libs/angularjs/abp.ng.js | 81 ++- .../Abp/Framework/styles/abp.mixings.css.map | 1 + .../App_Start/EventCloudWebModule.cs | 12 +- src/EventCloud.Web/EventCloud.Web.csproj | 56 +- src/EventCloud.Web/Global.asax.cs | 2 +- src/EventCloud.Web/Logs/Logs.txt | 250 +++++++++ .../Models/Account/RegisterTenantViewModel.cs | 3 +- .../Models/Account/RegisterViewModel.cs | 3 +- src/EventCloud.Web/Web.config | 2 +- src/EventCloud.Web/packages.config | 26 +- .../EventCloud.WebApi.csproj | 36 +- src/EventCloud.WebApi/app.config | 2 +- src/EventCloud.WebApi/packages.config | 15 +- .../EventCloud.Tests/EventCloud.Tests.csproj | 53 +- .../EventCloud.Tests/EventCloudTestModule.cs | 15 + .../Sessions/EventCloudTestBase.cs | 14 +- src/Tests/EventCloud.Tests/packages.config | 25 +- 48 files changed, 1441 insertions(+), 250 deletions(-) create mode 100644 src/EventCloud.EntityFramework/Migrations/201607190808209_Upgraded_To_Abp_v0_10_0.Designer.cs create mode 100644 src/EventCloud.EntityFramework/Migrations/201607190808209_Upgraded_To_Abp_v0_10_0.cs create mode 100644 src/EventCloud.EntityFramework/Migrations/201607190808209_Upgraded_To_Abp_v0_10_0.resx create mode 100644 src/EventCloud.Web/Abp/Framework/scripts/libs/abp.moment.js create mode 100644 src/EventCloud.Web/Abp/Framework/styles/abp.mixings.css.map create mode 100644 src/Tests/EventCloud.Tests/EventCloudTestModule.cs diff --git a/src/EventCloud.Application/EventCloud.Application.csproj b/src/EventCloud.Application/EventCloud.Application.csproj index 5a3fbbc..cf1723c 100644 --- a/src/EventCloud.Application/EventCloud.Application.csproj +++ b/src/EventCloud.Application/EventCloud.Application.csproj @@ -33,16 +33,16 @@ 4 - - ..\packages\Abp.0.8.0.1\lib\net461\Abp.dll + + ..\packages\Abp.0.10.0.1\lib\net452\Abp.dll True - - ..\packages\Abp.AutoMapper.0.8.0.1\lib\net461\Abp.AutoMapper.dll + + ..\packages\Abp.AutoMapper.0.10.0.1\lib\net452\Abp.AutoMapper.dll True - - ..\packages\Abp.Zero.0.8.0.1\lib\net461\Abp.Zero.dll + + ..\packages\Abp.Zero.0.10.0.0\lib\net452\Abp.Zero.dll True @@ -73,8 +73,8 @@ ..\packages\Microsoft.AspNet.Identity.Core.2.2.1\lib\net45\Microsoft.AspNet.Identity.Core.dll True - - ..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll + + ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll True @@ -90,12 +90,15 @@ True - - ..\packages\System.Collections.Immutable.1.1.36\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll + + ..\packages\System.Collections.Immutable.1.2.0\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll True + + + diff --git a/src/EventCloud.Application/Events/Dtos/CreateEventInput.cs b/src/EventCloud.Application/Events/Dtos/CreateEventInput.cs index 319adc0..0efc7e1 100644 --- a/src/EventCloud.Application/Events/Dtos/CreateEventInput.cs +++ b/src/EventCloud.Application/Events/Dtos/CreateEventInput.cs @@ -1,10 +1,9 @@ using System; using System.ComponentModel.DataAnnotations; -using Abp.Application.Services.Dto; namespace EventCloud.Events.Dtos { - public class CreateEventInput : IInputDto + public class CreateEventInput { [Required] [StringLength(Event.MaxTitleLength)] diff --git a/src/EventCloud.Application/Events/Dtos/EventDetailOutput.cs b/src/EventCloud.Application/Events/Dtos/EventDetailOutput.cs index 643b2c5..59536c2 100644 --- a/src/EventCloud.Application/Events/Dtos/EventDetailOutput.cs +++ b/src/EventCloud.Application/Events/Dtos/EventDetailOutput.cs @@ -6,7 +6,7 @@ namespace EventCloud.Events.Dtos { [AutoMapFrom(typeof(Event))] - public class EventDetailOutput : FullAuditedEntityDto, IOutputDto + public class EventDetailOutput : FullAuditedEntityDto { public string Title { get; set; } diff --git a/src/EventCloud.Application/Events/Dtos/EventRegisterOutput.cs b/src/EventCloud.Application/Events/Dtos/EventRegisterOutput.cs index 8707c77..93bf377 100644 --- a/src/EventCloud.Application/Events/Dtos/EventRegisterOutput.cs +++ b/src/EventCloud.Application/Events/Dtos/EventRegisterOutput.cs @@ -1,8 +1,6 @@ -using Abp.Application.Services.Dto; - namespace EventCloud.Events.Dtos { - public class EventRegisterOutput : IOutputDto + public class EventRegisterOutput { public int RegistrationId { get; set; } } diff --git a/src/EventCloud.Application/Events/Dtos/GetEventListInput.cs b/src/EventCloud.Application/Events/Dtos/GetEventListInput.cs index bf6d84b..a91ea21 100644 --- a/src/EventCloud.Application/Events/Dtos/GetEventListInput.cs +++ b/src/EventCloud.Application/Events/Dtos/GetEventListInput.cs @@ -1,8 +1,6 @@ -using Abp.Application.Services.Dto; - -namespace EventCloud.Events.Dtos +namespace EventCloud.Events.Dtos { - public class GetEventListInput : IInputDto + public class GetEventListInput { public bool IncludeCanceledEvents { get; set; } } diff --git a/src/EventCloud.Application/Roles/Dto/UpdateRolePermissionsInput.cs b/src/EventCloud.Application/Roles/Dto/UpdateRolePermissionsInput.cs index e199586..31770bf 100644 --- a/src/EventCloud.Application/Roles/Dto/UpdateRolePermissionsInput.cs +++ b/src/EventCloud.Application/Roles/Dto/UpdateRolePermissionsInput.cs @@ -1,10 +1,9 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -using Abp.Application.Services.Dto; namespace EventCloud.Roles.Dto { - public class UpdateRolePermissionsInput : IInputDto + public class UpdateRolePermissionsInput { [Range(1, int.MaxValue)] public int RoleId { get; set; } diff --git a/src/EventCloud.Application/Sessions/Dto/GetCurrentLoginInformationsOutput.cs b/src/EventCloud.Application/Sessions/Dto/GetCurrentLoginInformationsOutput.cs index c0444b2..702be7a 100644 --- a/src/EventCloud.Application/Sessions/Dto/GetCurrentLoginInformationsOutput.cs +++ b/src/EventCloud.Application/Sessions/Dto/GetCurrentLoginInformationsOutput.cs @@ -1,8 +1,6 @@ -using Abp.Application.Services.Dto; - -namespace EventCloud.Sessions.Dto +namespace EventCloud.Sessions.Dto { - public class GetCurrentLoginInformationsOutput : IOutputDto + public class GetCurrentLoginInformationsOutput { public UserLoginInfoDto User { get; set; } diff --git a/src/EventCloud.Application/Users/Dto/ProhibitPermissionInput.cs b/src/EventCloud.Application/Users/Dto/ProhibitPermissionInput.cs index 4184a3e..3c75433 100644 --- a/src/EventCloud.Application/Users/Dto/ProhibitPermissionInput.cs +++ b/src/EventCloud.Application/Users/Dto/ProhibitPermissionInput.cs @@ -1,9 +1,8 @@ using System.ComponentModel.DataAnnotations; -using Abp.Application.Services.Dto; namespace EventCloud.Users.Dto { - public class ProhibitPermissionInput : IInputDto + public class ProhibitPermissionInput { [Range(1, long.MaxValue)] public int UserId { get; set; } diff --git a/src/EventCloud.Application/packages.config b/src/EventCloud.Application/packages.config index c65f28f..2b91550 100644 --- a/src/EventCloud.Application/packages.config +++ b/src/EventCloud.Application/packages.config @@ -1,15 +1,15 @@  - - - + + + - + - + \ No newline at end of file diff --git a/src/EventCloud.Core/Authorization/Roles/Role.cs b/src/EventCloud.Core/Authorization/Roles/Role.cs index 720da12..2cbca81 100644 --- a/src/EventCloud.Core/Authorization/Roles/Role.cs +++ b/src/EventCloud.Core/Authorization/Roles/Role.cs @@ -1,10 +1,9 @@ using Abp.Authorization.Roles; -using EventCloud.MultiTenancy; using EventCloud.Users; namespace EventCloud.Authorization.Roles { - public class Role : AbpRole + public class Role : AbpRole { } diff --git a/src/EventCloud.Core/Authorization/Roles/RoleManager.cs b/src/EventCloud.Core/Authorization/Roles/RoleManager.cs index b20fbc5..e540301 100644 --- a/src/EventCloud.Core/Authorization/Roles/RoleManager.cs +++ b/src/EventCloud.Core/Authorization/Roles/RoleManager.cs @@ -1,24 +1,26 @@ using Abp.Authorization; using Abp.Authorization.Roles; +using Abp.Domain.Uow; using Abp.Runtime.Caching; using Abp.Zero.Configuration; -using EventCloud.MultiTenancy; using EventCloud.Users; namespace EventCloud.Authorization.Roles { - public class RoleManager : AbpRoleManager + public class RoleManager : AbpRoleManager { public RoleManager( RoleStore store, IPermissionManager permissionManager, IRoleManagementConfig roleManagementConfig, - ICacheManager cacheManager) + ICacheManager cacheManager, + IUnitOfWorkManager unitOfWorkManager) : base( store, permissionManager, roleManagementConfig, - cacheManager) + cacheManager, + unitOfWorkManager) { } } diff --git a/src/EventCloud.Core/Authorization/Roles/RoleStore.cs b/src/EventCloud.Core/Authorization/Roles/RoleStore.cs index d08c57b..bc9e2b7 100644 --- a/src/EventCloud.Core/Authorization/Roles/RoleStore.cs +++ b/src/EventCloud.Core/Authorization/Roles/RoleStore.cs @@ -1,12 +1,11 @@ using Abp.Authorization.Roles; using Abp.Authorization.Users; using Abp.Domain.Repositories; -using EventCloud.MultiTenancy; using EventCloud.Users; namespace EventCloud.Authorization.Roles { - public class RoleStore : AbpRoleStore + public class RoleStore : AbpRoleStore { public RoleStore( IRepository roleRepository, diff --git a/src/EventCloud.Core/Editions/EditionManager.cs b/src/EventCloud.Core/Editions/EditionManager.cs index c801286..f2f05fa 100644 --- a/src/EventCloud.Core/Editions/EditionManager.cs +++ b/src/EventCloud.Core/Editions/EditionManager.cs @@ -1,6 +1,7 @@ using Abp.Application.Editions; using Abp.Application.Features; using Abp.Domain.Repositories; +using EventCloud.Features; namespace EventCloud.Editions { @@ -8,10 +9,10 @@ public class EditionManager : AbpEditionManager { public EditionManager( IRepository editionRepository, - IRepository editionFeatureRepository) + FeatureValueStore featureValueStore) : base( editionRepository, - editionFeatureRepository) + featureValueStore) { } } diff --git a/src/EventCloud.Core/EventCloud.Core.csproj b/src/EventCloud.Core/EventCloud.Core.csproj index 091101d..a2e38fc 100644 --- a/src/EventCloud.Core/EventCloud.Core.csproj +++ b/src/EventCloud.Core/EventCloud.Core.csproj @@ -33,12 +33,12 @@ 4 - - ..\packages\Abp.0.8.0.1\lib\net461\Abp.dll + + ..\packages\Abp.0.10.0.1\lib\net452\Abp.dll True - - ..\packages\Abp.Zero.0.8.0.1\lib\net461\Abp.Zero.dll + + ..\packages\Abp.Zero.0.10.0.0\lib\net452\Abp.Zero.dll True @@ -65,8 +65,8 @@ ..\packages\Microsoft.AspNet.Identity.Core.2.2.1\lib\net45\Microsoft.AspNet.Identity.Core.dll True - - ..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll + + ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll True @@ -82,12 +82,15 @@ True - - ..\packages\System.Collections.Immutable.1.1.36\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll + + ..\packages\System.Collections.Immutable.1.2.0\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll True + + + diff --git a/src/EventCloud.Core/Features/FeatureValueStore.cs b/src/EventCloud.Core/Features/FeatureValueStore.cs index 666ccd5..e71b6bc 100644 --- a/src/EventCloud.Core/Features/FeatureValueStore.cs +++ b/src/EventCloud.Core/Features/FeatureValueStore.cs @@ -1,4 +1,8 @@ using Abp.Application.Features; +using Abp.Domain.Repositories; +using Abp.Domain.Uow; +using Abp.MultiTenancy; +using Abp.Runtime.Caching; using EventCloud.Authorization.Roles; using EventCloud.MultiTenancy; using EventCloud.Users; @@ -7,8 +11,20 @@ namespace EventCloud.Features { public class FeatureValueStore : AbpFeatureValueStore { - public FeatureValueStore(TenantManager tenantManager) - : base(tenantManager) + public FeatureValueStore( + ICacheManager cacheManager, + IRepository tenantFeatureSettingRepository, + IRepository tenantRepository, + IRepository editionFeatureSettingRepository, + IFeatureManager featureManager, + IUnitOfWorkManager unitOfWorkManager) + : base( + cacheManager, + tenantFeatureSettingRepository, + tenantRepository, + editionFeatureSettingRepository, + featureManager, + unitOfWorkManager) { } } diff --git a/src/EventCloud.Core/MultiTenancy/Tenant.cs b/src/EventCloud.Core/MultiTenancy/Tenant.cs index b4dfc90..46eb567 100644 --- a/src/EventCloud.Core/MultiTenancy/Tenant.cs +++ b/src/EventCloud.Core/MultiTenancy/Tenant.cs @@ -3,7 +3,7 @@ namespace EventCloud.MultiTenancy { - public class Tenant : AbpTenant + public class Tenant : AbpTenant { } diff --git a/src/EventCloud.Core/MultiTenancy/TenantManager.cs b/src/EventCloud.Core/MultiTenancy/TenantManager.cs index d455d4b..7843f99 100644 --- a/src/EventCloud.Core/MultiTenancy/TenantManager.cs +++ b/src/EventCloud.Core/MultiTenancy/TenantManager.cs @@ -1,4 +1,5 @@ -using Abp.Domain.Repositories; +using Abp.Application.Features; +using Abp.Domain.Repositories; using Abp.MultiTenancy; using EventCloud.Authorization.Roles; using EventCloud.Editions; @@ -11,11 +12,13 @@ public class TenantManager : AbpTenantManager public TenantManager( IRepository tenantRepository, IRepository tenantFeatureRepository, - EditionManager editionManager + EditionManager editionManager, + IAbpZeroFeatureValueStore featureValueStore ) : base( tenantRepository, - tenantFeatureRepository, - editionManager) + tenantFeatureRepository, + editionManager, + featureValueStore) { } } diff --git a/src/EventCloud.Core/Users/User.cs b/src/EventCloud.Core/Users/User.cs index 572ec41..0a7de09 100644 --- a/src/EventCloud.Core/Users/User.cs +++ b/src/EventCloud.Core/Users/User.cs @@ -1,12 +1,11 @@ using System; using Abp.Authorization.Users; using Abp.Extensions; -using EventCloud.MultiTenancy; using Microsoft.AspNet.Identity; namespace EventCloud.Users { - public class User : AbpUser + public class User : AbpUser { public static string CreateRandomPassword() { diff --git a/src/EventCloud.Core/Users/UserManager.cs b/src/EventCloud.Core/Users/UserManager.cs index 0bdf248..113b7f6 100644 --- a/src/EventCloud.Core/Users/UserManager.cs +++ b/src/EventCloud.Core/Users/UserManager.cs @@ -28,7 +28,8 @@ public UserManager( ICacheManager cacheManager, IRepository organizationUnitRepository, IRepository userOrganizationUnitRepository, - IOrganizationUnitSettings organizationUnitSettings) + IOrganizationUnitSettings organizationUnitSettings, + IRepository userLoginAttemptRepository) : base( store, roleManager, @@ -42,7 +43,8 @@ public UserManager( cacheManager, organizationUnitRepository, userOrganizationUnitRepository, - organizationUnitSettings + organizationUnitSettings, + userLoginAttemptRepository ) { } diff --git a/src/EventCloud.Core/Users/UserStore.cs b/src/EventCloud.Core/Users/UserStore.cs index bb7f89d..560eb79 100644 --- a/src/EventCloud.Core/Users/UserStore.cs +++ b/src/EventCloud.Core/Users/UserStore.cs @@ -2,11 +2,10 @@ using Abp.Domain.Repositories; using Abp.Domain.Uow; using EventCloud.Authorization.Roles; -using EventCloud.MultiTenancy; namespace EventCloud.Users { - public class UserStore : AbpUserStore + public class UserStore : AbpUserStore { public UserStore( IRepository userRepository, diff --git a/src/EventCloud.Core/packages.config b/src/EventCloud.Core/packages.config index 629f39f..b60a5c9 100644 --- a/src/EventCloud.Core/packages.config +++ b/src/EventCloud.Core/packages.config @@ -1,13 +1,13 @@  - - + + - + - + \ No newline at end of file diff --git a/src/EventCloud.EntityFramework/EventCloud.EntityFramework.csproj b/src/EventCloud.EntityFramework/EventCloud.EntityFramework.csproj index 57f85bc..0335b64 100644 --- a/src/EventCloud.EntityFramework/EventCloud.EntityFramework.csproj +++ b/src/EventCloud.EntityFramework/EventCloud.EntityFramework.csproj @@ -33,20 +33,24 @@ 4 - - ..\packages\Abp.0.8.0.1\lib\net461\Abp.dll + + ..\packages\Abp.0.10.0.1\lib\net452\Abp.dll True - - ..\packages\Abp.EntityFramework.0.8.0.1\lib\net461\Abp.EntityFramework.dll + + ..\packages\Abp.EntityFramework.0.10.0.2\lib\net452\Abp.EntityFramework.dll True - - ..\packages\Abp.Zero.0.8.0.1\lib\net461\Abp.Zero.dll + + ..\packages\Abp.EntityFramework.Common.0.10.0.1\lib\net452\Abp.EntityFramework.Common.dll True - - ..\packages\Abp.Zero.EntityFramework.0.8.0.1\lib\net461\Abp.Zero.EntityFramework.dll + + ..\packages\Abp.Zero.0.10.0.0\lib\net452\Abp.Zero.dll + True + + + ..\packages\Abp.Zero.EntityFramework.0.10.0.0\lib\net452\Abp.Zero.EntityFramework.dll True @@ -65,8 +69,8 @@ False ..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll - - ..\packages\EntityFramework.DynamicFilters.1.4.6\lib\net40\EntityFramework.DynamicFilters.dll + + ..\packages\EntityFramework.DynamicFilters.1.4.11\lib\net40\EntityFramework.DynamicFilters.dll True @@ -77,8 +81,8 @@ ..\packages\Microsoft.AspNet.Identity.Core.2.2.1\lib\net45\Microsoft.AspNet.Identity.Core.dll True - - ..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll + + ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll True @@ -94,12 +98,15 @@ True - - ..\packages\System.Collections.Immutable.1.1.36\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll + + ..\packages\System.Collections.Immutable.1.2.0\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll True + + + @@ -153,6 +160,10 @@ 201602170816278_Upgrade_To_ABP_0_8.cs + + + 201607190808209_Upgraded_To_Abp_v0_10_0.cs + @@ -205,6 +216,9 @@ 201602170816278_Upgrade_To_ABP_0_8.cs + + 201607190808209_Upgraded_To_Abp_v0_10_0.cs + diff --git a/src/EventCloud.EntityFramework/Migrations/201607190808209_Upgraded_To_Abp_v0_10_0.Designer.cs b/src/EventCloud.EntityFramework/Migrations/201607190808209_Upgraded_To_Abp_v0_10_0.Designer.cs new file mode 100644 index 0000000..7a74db4 --- /dev/null +++ b/src/EventCloud.EntityFramework/Migrations/201607190808209_Upgraded_To_Abp_v0_10_0.Designer.cs @@ -0,0 +1,29 @@ +// +namespace EventCloud.Migrations +{ + using System.CodeDom.Compiler; + using System.Data.Entity.Migrations; + using System.Data.Entity.Migrations.Infrastructure; + using System.Resources; + + [GeneratedCode("EntityFramework.Migrations", "6.1.3-40302")] + public sealed partial class Upgraded_To_Abp_v0_10_0 : IMigrationMetadata + { + private readonly ResourceManager Resources = new ResourceManager(typeof(Upgraded_To_Abp_v0_10_0)); + + string IMigrationMetadata.Id + { + get { return "201607190808209_Upgraded_To_Abp_v0_10_0"; } + } + + string IMigrationMetadata.Source + { + get { return null; } + } + + string IMigrationMetadata.Target + { + get { return Resources.GetString("Target"); } + } + } +} diff --git a/src/EventCloud.EntityFramework/Migrations/201607190808209_Upgraded_To_Abp_v0_10_0.cs b/src/EventCloud.EntityFramework/Migrations/201607190808209_Upgraded_To_Abp_v0_10_0.cs new file mode 100644 index 0000000..efa6421 --- /dev/null +++ b/src/EventCloud.EntityFramework/Migrations/201607190808209_Upgraded_To_Abp_v0_10_0.cs @@ -0,0 +1,492 @@ +namespace EventCloud.Migrations +{ + using System; + using System.Collections.Generic; + using System.Data.Entity.Infrastructure.Annotations; + using System.Data.Entity.Migrations; + + public partial class Upgraded_To_Abp_v0_10_0 : DbMigration + { + public override void Up() + { + DropForeignKey("dbo.AbpSettings", "TenantId", "dbo.AbpTenants"); + DropForeignKey("dbo.AbpUsers", "TenantId", "dbo.AbpTenants"); + DropForeignKey("dbo.AbpRoles", "TenantId", "dbo.AbpTenants"); + DropIndex("dbo.AbpUsers", new[] { "TenantId" }); + DropIndex("dbo.AbpSettings", new[] { "TenantId" }); + DropIndex("dbo.AbpNotificationSubscriptions", new[] { "NotificationName", "EntityTypeName", "EntityId", "UserId" }); + DropIndex("dbo.AbpRoles", new[] { "TenantId" }); + CreateTable( + "dbo.AbpTenantNotifications", + c => new + { + Id = c.Guid(nullable: false), + TenantId = c.Int(), + NotificationName = c.String(nullable: false, maxLength: 96), + Data = c.String(), + DataTypeName = c.String(maxLength: 512), + EntityTypeName = c.String(maxLength: 250), + EntityTypeAssemblyQualifiedName = c.String(maxLength: 512), + EntityId = c.String(maxLength: 96), + Severity = c.Byte(nullable: false), + CreationTime = c.DateTime(nullable: false), + CreatorUserId = c.Long(), + }, + annotations: new Dictionary + { + { "DynamicFilter_TenantNotificationInfo_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, + }) + .PrimaryKey(t => t.Id); + + CreateTable( + "dbo.AbpUserAccounts", + c => new + { + Id = c.Long(nullable: false, identity: true), + TenantId = c.Int(), + UserId = c.Long(nullable: false), + UserLinkId = c.Long(), + UserName = c.String(), + EmailAddress = c.String(), + LastLoginTime = c.DateTime(), + IsDeleted = c.Boolean(nullable: false), + DeleterUserId = c.Long(), + DeletionTime = c.DateTime(), + LastModificationTime = c.DateTime(), + LastModifierUserId = c.Long(), + CreationTime = c.DateTime(nullable: false), + CreatorUserId = c.Long(), + }, + annotations: new Dictionary + { + { "DynamicFilter_UserAccount_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, + }) + .PrimaryKey(t => t.Id); + + CreateTable( + "dbo.AbpUserLoginAttempts", + c => new + { + Id = c.Long(nullable: false, identity: true), + TenantId = c.Int(), + TenancyName = c.String(maxLength: 64), + UserId = c.Long(), + UserNameOrEmailAddress = c.String(maxLength: 255), + ClientIpAddress = c.String(maxLength: 64), + ClientName = c.String(maxLength: 128), + BrowserInfo = c.String(maxLength: 256), + Result = c.Byte(nullable: false), + CreationTime = c.DateTime(nullable: false), + }, + annotations: new Dictionary + { + { "DynamicFilter_UserLoginAttempt_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, + }) + .PrimaryKey(t => t.Id) + .Index(t => new { t.UserId, t.TenantId }) + .Index(t => new { t.TenancyName, t.UserNameOrEmailAddress, t.Result }); + + AlterTableAnnotations( + "dbo.AbpFeatures", + c => new + { + Id = c.Long(nullable: false, identity: true), + Name = c.String(nullable: false, maxLength: 128), + Value = c.String(nullable: false, maxLength: 2000), + CreationTime = c.DateTime(nullable: false), + CreatorUserId = c.Long(), + EditionId = c.Int(), + TenantId = c.Int(), + Discriminator = c.String(nullable: false, maxLength: 128), + }, + annotations: new Dictionary + { + { + "DynamicFilter_TenantFeatureSetting_MustHaveTenant", + new AnnotationValues(oldValue: null, newValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition") + }, + }); + + AlterTableAnnotations( + "dbo.AbpUserLogins", + c => new + { + Id = c.Long(nullable: false, identity: true), + TenantId = c.Int(), + UserId = c.Long(nullable: false), + LoginProvider = c.String(nullable: false, maxLength: 128), + ProviderKey = c.String(nullable: false, maxLength: 256), + }, + annotations: new Dictionary + { + { + "DynamicFilter_UserLogin_MayHaveTenant", + new AnnotationValues(oldValue: null, newValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition") + }, + }); + + AlterTableAnnotations( + "dbo.AbpPermissions", + c => new + { + Id = c.Long(nullable: false, identity: true), + TenantId = c.Int(), + Name = c.String(nullable: false, maxLength: 128), + IsGranted = c.Boolean(nullable: false), + CreationTime = c.DateTime(nullable: false), + CreatorUserId = c.Long(), + UserId = c.Long(), + RoleId = c.Int(), + Discriminator = c.String(nullable: false, maxLength: 128), + }, + annotations: new Dictionary + { + { + "DynamicFilter_PermissionSetting_MayHaveTenant", + new AnnotationValues(oldValue: null, newValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition") + }, + { + "DynamicFilter_RolePermissionSetting_MayHaveTenant", + new AnnotationValues(oldValue: null, newValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition") + }, + { + "DynamicFilter_UserPermissionSetting_MayHaveTenant", + new AnnotationValues(oldValue: null, newValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition") + }, + }); + + AlterTableAnnotations( + "dbo.AbpUserRoles", + c => new + { + Id = c.Long(nullable: false, identity: true), + TenantId = c.Int(), + UserId = c.Long(nullable: false), + RoleId = c.Int(nullable: false), + CreationTime = c.DateTime(nullable: false), + CreatorUserId = c.Long(), + }, + annotations: new Dictionary + { + { + "DynamicFilter_UserRole_MayHaveTenant", + new AnnotationValues(oldValue: null, newValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition") + }, + }); + + AlterTableAnnotations( + "dbo.AbpSettings", + c => new + { + Id = c.Long(nullable: false, identity: true), + TenantId = c.Int(), + UserId = c.Long(), + Name = c.String(nullable: false, maxLength: 256), + Value = c.String(maxLength: 2000), + LastModificationTime = c.DateTime(), + LastModifierUserId = c.Long(), + CreationTime = c.DateTime(nullable: false), + CreatorUserId = c.Long(), + }, + annotations: new Dictionary + { + { + "DynamicFilter_Setting_MayHaveTenant", + new AnnotationValues(oldValue: null, newValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition") + }, + }); + + AlterTableAnnotations( + "dbo.AbpNotificationSubscriptions", + c => new + { + Id = c.Guid(nullable: false), + TenantId = c.Int(), + UserId = c.Long(nullable: false), + NotificationName = c.String(maxLength: 96), + EntityTypeName = c.String(maxLength: 250), + EntityTypeAssemblyQualifiedName = c.String(maxLength: 512), + EntityId = c.String(maxLength: 96), + CreationTime = c.DateTime(nullable: false), + CreatorUserId = c.Long(), + }, + annotations: new Dictionary + { + { + "DynamicFilter_NotificationSubscriptionInfo_MayHaveTenant", + new AnnotationValues(oldValue: null, newValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition") + }, + }); + + AlterTableAnnotations( + "dbo.AbpUserNotifications", + c => new + { + Id = c.Guid(nullable: false), + TenantId = c.Int(), + UserId = c.Long(nullable: false), + TenantNotificationId = c.Guid(nullable: false), + State = c.Int(nullable: false), + CreationTime = c.DateTime(nullable: false), + }, + annotations: new Dictionary + { + { + "DynamicFilter_UserNotificationInfo_MayHaveTenant", + new AnnotationValues(oldValue: null, newValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition") + }, + }); + + AddColumn("dbo.AbpUserLogins", "TenantId", c => c.Int()); + AddColumn("dbo.AbpPermissions", "TenantId", c => c.Int()); + AddColumn("dbo.AbpUserRoles", "TenantId", c => c.Int()); + AddColumn("dbo.AbpTenants", "ConnectionString", c => c.String(maxLength: 1024)); + AddColumn("dbo.AbpUserNotifications", "TenantId", c => c.Int()); + AlterColumn("dbo.AbpNotifications", "NotificationName", c => c.String(nullable: false, maxLength: 96)); + AlterColumn("dbo.AbpNotifications", "EntityTypeName", c => c.String(maxLength: 250)); + AlterColumn("dbo.AbpNotifications", "EntityId", c => c.String(maxLength: 96)); + AlterColumn("dbo.AbpNotificationSubscriptions", "NotificationName", c => c.String(maxLength: 96)); + AlterColumn("dbo.AbpNotificationSubscriptions", "EntityTypeName", c => c.String(maxLength: 250)); + AlterColumn("dbo.AbpNotificationSubscriptions", "EntityId", c => c.String(maxLength: 96)); + CreateIndex("dbo.AbpNotificationSubscriptions", new[] { "NotificationName", "EntityTypeName", "EntityId", "UserId" }); + + RenameColumn("dbo.AbpUserNotifications", "NotificationId", "TenantNotificationId"); + + //Update current AbpUserRoles.TenantId values + + Sql(@"UPDATE AbpUserRoles +SET TenantId = AbpUsers.TenantId +FROM AbpUsers +WHERE AbpUserRoles.UserId = AbpUsers.Id"); + + //Update current AbpUserLogins.TenantId values + + Sql(@"UPDATE AbpUserLogins +SET TenantId = AbpUsers.TenantId +FROM AbpUsers +WHERE AbpUserLogins.UserId = AbpUsers.Id"); + + //Update current AbpPermissions.TenantId values + + Sql(@"UPDATE AbpPermissions +SET TenantId = AbpUsers.TenantId +FROM AbpUsers +WHERE AbpPermissions.UserId = AbpUsers.Id"); + + Sql(@"UPDATE AbpPermissions +SET TenantId = AbpRoles.TenantId +FROM AbpRoles +WHERE AbpPermissions.RoleId = AbpRoles.Id"); + + //Update current AbpUserNotifications.TenantId values + + Sql(@"UPDATE AbpUserNotifications +SET TenantId = AbpUsers.TenantId +FROM AbpUsers +WHERE AbpUserNotifications.UserId = AbpUsers.Id"); + + //Update current AbpSettings.TenantId values + + Sql(@"UPDATE AbpSettings +SET TenantId = AbpUsers.TenantId +FROM AbpUsers +WHERE AbpSettings.UserId = AbpUsers.Id"); + + Sql(@"INSERT INTO AbpUserAccounts(TenantId, UserId, UserName, EmailAddress, LastLoginTime, CreationTime, IsDeleted) +SELECT TenantId, Id AS UserId, UserName, EmailAddress, LastLoginTime, CreationTime, IsDeleted FROM AbpUsers"); + } + + public override void Down() + { + RenameColumn("dbo.AbpUserNotifications", "TenantNotificationId", "NotificationId"); + + DropIndex("dbo.AbpUserLoginAttempts", new[] { "TenancyName", "UserNameOrEmailAddress", "Result" }); + DropIndex("dbo.AbpUserLoginAttempts", new[] { "UserId", "TenantId" }); + DropIndex("dbo.AbpNotificationSubscriptions", new[] { "NotificationName", "EntityTypeName", "EntityId", "UserId" }); + AlterColumn("dbo.AbpNotificationSubscriptions", "EntityId", c => c.String(maxLength: 128)); + AlterColumn("dbo.AbpNotificationSubscriptions", "EntityTypeName", c => c.String(maxLength: 256)); + AlterColumn("dbo.AbpNotificationSubscriptions", "NotificationName", c => c.String(maxLength: 128)); + AlterColumn("dbo.AbpNotifications", "EntityId", c => c.String(maxLength: 128)); + AlterColumn("dbo.AbpNotifications", "EntityTypeName", c => c.String(maxLength: 256)); + AlterColumn("dbo.AbpNotifications", "NotificationName", c => c.String(nullable: false, maxLength: 128)); + DropColumn("dbo.AbpUserNotifications", "TenantId"); + DropColumn("dbo.AbpTenants", "ConnectionString"); + DropColumn("dbo.AbpUserRoles", "TenantId"); + DropColumn("dbo.AbpPermissions", "TenantId"); + DropColumn("dbo.AbpUserLogins", "TenantId"); + AlterTableAnnotations( + "dbo.AbpUserNotifications", + c => new + { + Id = c.Guid(nullable: false), + TenantId = c.Int(), + UserId = c.Long(nullable: false), + TenantNotificationId = c.Guid(nullable: false), + State = c.Int(nullable: false), + CreationTime = c.DateTime(nullable: false), + }, + annotations: new Dictionary + { + { + "DynamicFilter_UserNotificationInfo_MayHaveTenant", + new AnnotationValues(oldValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition", newValue: null) + }, + }); + + AlterTableAnnotations( + "dbo.AbpNotificationSubscriptions", + c => new + { + Id = c.Guid(nullable: false), + TenantId = c.Int(), + UserId = c.Long(nullable: false), + NotificationName = c.String(maxLength: 96), + EntityTypeName = c.String(maxLength: 250), + EntityTypeAssemblyQualifiedName = c.String(maxLength: 512), + EntityId = c.String(maxLength: 96), + CreationTime = c.DateTime(nullable: false), + CreatorUserId = c.Long(), + }, + annotations: new Dictionary + { + { + "DynamicFilter_NotificationSubscriptionInfo_MayHaveTenant", + new AnnotationValues(oldValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition", newValue: null) + }, + }); + + AlterTableAnnotations( + "dbo.AbpSettings", + c => new + { + Id = c.Long(nullable: false, identity: true), + TenantId = c.Int(), + UserId = c.Long(), + Name = c.String(nullable: false, maxLength: 256), + Value = c.String(maxLength: 2000), + LastModificationTime = c.DateTime(), + LastModifierUserId = c.Long(), + CreationTime = c.DateTime(nullable: false), + CreatorUserId = c.Long(), + }, + annotations: new Dictionary + { + { + "DynamicFilter_Setting_MayHaveTenant", + new AnnotationValues(oldValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition", newValue: null) + }, + }); + + AlterTableAnnotations( + "dbo.AbpUserRoles", + c => new + { + Id = c.Long(nullable: false, identity: true), + TenantId = c.Int(), + UserId = c.Long(nullable: false), + RoleId = c.Int(nullable: false), + CreationTime = c.DateTime(nullable: false), + CreatorUserId = c.Long(), + }, + annotations: new Dictionary + { + { + "DynamicFilter_UserRole_MayHaveTenant", + new AnnotationValues(oldValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition", newValue: null) + }, + }); + + AlterTableAnnotations( + "dbo.AbpPermissions", + c => new + { + Id = c.Long(nullable: false, identity: true), + TenantId = c.Int(), + Name = c.String(nullable: false, maxLength: 128), + IsGranted = c.Boolean(nullable: false), + CreationTime = c.DateTime(nullable: false), + CreatorUserId = c.Long(), + UserId = c.Long(), + RoleId = c.Int(), + Discriminator = c.String(nullable: false, maxLength: 128), + }, + annotations: new Dictionary + { + { + "DynamicFilter_PermissionSetting_MayHaveTenant", + new AnnotationValues(oldValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition", newValue: null) + }, + { + "DynamicFilter_RolePermissionSetting_MayHaveTenant", + new AnnotationValues(oldValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition", newValue: null) + }, + { + "DynamicFilter_UserPermissionSetting_MayHaveTenant", + new AnnotationValues(oldValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition", newValue: null) + }, + }); + + AlterTableAnnotations( + "dbo.AbpUserLogins", + c => new + { + Id = c.Long(nullable: false, identity: true), + TenantId = c.Int(), + UserId = c.Long(nullable: false), + LoginProvider = c.String(nullable: false, maxLength: 128), + ProviderKey = c.String(nullable: false, maxLength: 256), + }, + annotations: new Dictionary + { + { + "DynamicFilter_UserLogin_MayHaveTenant", + new AnnotationValues(oldValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition", newValue: null) + }, + }); + + AlterTableAnnotations( + "dbo.AbpFeatures", + c => new + { + Id = c.Long(nullable: false, identity: true), + Name = c.String(nullable: false, maxLength: 128), + Value = c.String(nullable: false, maxLength: 2000), + CreationTime = c.DateTime(nullable: false), + CreatorUserId = c.Long(), + EditionId = c.Int(), + TenantId = c.Int(), + Discriminator = c.String(nullable: false, maxLength: 128), + }, + annotations: new Dictionary + { + { + "DynamicFilter_TenantFeatureSetting_MustHaveTenant", + new AnnotationValues(oldValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition", newValue: null) + }, + }); + + DropTable("dbo.AbpUserLoginAttempts", + removedAnnotations: new Dictionary + { + { "DynamicFilter_UserLoginAttempt_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, + }); + DropTable("dbo.AbpUserAccounts", + removedAnnotations: new Dictionary + { + { "DynamicFilter_UserAccount_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, + }); + DropTable("dbo.AbpTenantNotifications", + removedAnnotations: new Dictionary + { + { "DynamicFilter_TenantNotificationInfo_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, + }); + CreateIndex("dbo.AbpRoles", "TenantId"); + CreateIndex("dbo.AbpNotificationSubscriptions", new[] { "NotificationName", "EntityTypeName", "EntityId", "UserId" }); + CreateIndex("dbo.AbpSettings", "TenantId"); + CreateIndex("dbo.AbpUsers", "TenantId"); + AddForeignKey("dbo.AbpRoles", "TenantId", "dbo.AbpTenants", "Id"); + AddForeignKey("dbo.AbpUsers", "TenantId", "dbo.AbpTenants", "Id"); + AddForeignKey("dbo.AbpSettings", "TenantId", "dbo.AbpTenants", "Id"); + } + } +} diff --git a/src/EventCloud.EntityFramework/Migrations/201607190808209_Upgraded_To_Abp_v0_10_0.resx b/src/EventCloud.EntityFramework/Migrations/201607190808209_Upgraded_To_Abp_v0_10_0.resx new file mode 100644 index 0000000..f907dd6 --- /dev/null +++ b/src/EventCloud.EntityFramework/Migrations/201607190808209_Upgraded_To_Abp_v0_10_0.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + H4sIAAAAAAAEAO09227kupHvC+w/NPopCU66bc/lzBnYCTy258Q54xnHdrKLfTFkiW4Lo5Y6ktpj72K/bB/2k/YXltSV94tEqSVbGGDgFsmqYrFYLBaLrP/7n/89/PPTOpg9gjjxo/Bovr/Ym89A6EaeH66O5tv0/o8f5n/+07/+y+GZt36a/aOs9wbVgy3D5Gj+kKabj8tl4j6AtZMs1r4bR0l0ny7caL10vGh5sLf3y3J/fwkgiDmENZsdXm3D1F+D7Af8eRKFLtikWye4iDwQJMV3WHKdQZ19ddYg2TguOJqfPYIwPQmirbc4g0DS588xLPwRxd/ns+PAdyBF1yC4n8+cMIxSJ4X0fvx7Aq7TOApX1xv4wQlunjcA1rt3ggQU/fhYV9ft0t4B6tKybliCcrdJGq0NAe6/KXi0pJs34vS84iHkYs4o1OuMk0fz463np1+i1XxGI/t4EsSoIqxzt1lk9aAoLMoGP83Q5/8AcfRTJQ17i/29Bfz30+xkG6TbGByFYJvGTvDT7HJ7F/jub+D5JvoOwqNwGwQ4YZA0WEZ8gJ8u42gD4vT5CtwX5J5789mSbLekG1bNsDZ5R87D9P3b+ewrRO7cBaAad6zT12kUg19BCGInBd6lk6YgDhEMkHGOwU7hugGhE6YExjcHqkZQKGOGSHmTaxA/+i5AP8p2UK7h+MxnF87TFxCu0oej+cG79/PZZ/8JeOWXosN/D304s2GjNN4CFa4LkD5EXi+oLh00hSHLEwmq/b2DtxZwnT0Bd4vG/Mave3YKRz3/zQiJJr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qAQA= + + + dbo + + \ No newline at end of file diff --git a/src/EventCloud.EntityFramework/Migrations/SeedData/DefaultTenantRoleAndUserBuilder.cs b/src/EventCloud.EntityFramework/Migrations/SeedData/DefaultTenantRoleAndUserBuilder.cs index 6d4dcf3..c8a806a 100644 --- a/src/EventCloud.EntityFramework/Migrations/SeedData/DefaultTenantRoleAndUserBuilder.cs +++ b/src/EventCloud.EntityFramework/Migrations/SeedData/DefaultTenantRoleAndUserBuilder.cs @@ -51,7 +51,7 @@ private void CreateUserAndRoles() _context.SaveChanges(); - _context.UserRoles.Add(new UserRole(adminUserForTenancyOwner.Id, adminRoleForTenancyOwner.Id)); + _context.UserRoles.Add(new UserRole(null, adminUserForTenancyOwner.Id, adminRoleForTenancyOwner.Id)); _context.SaveChanges(); } @@ -100,7 +100,7 @@ private void CreateUserAndRoles() }); _context.SaveChanges(); - _context.UserRoles.Add(new UserRole(adminUserForDefaultTenant.Id, adminRoleForDefaultTenant.Id)); + _context.UserRoles.Add(new UserRole(defaultTenant.Id, adminUserForDefaultTenant.Id, adminRoleForDefaultTenant.Id)); _context.SaveChanges(); } } diff --git a/src/EventCloud.EntityFramework/packages.config b/src/EventCloud.EntityFramework/packages.config index 58ab19f..c2b3c8c 100644 --- a/src/EventCloud.EntityFramework/packages.config +++ b/src/EventCloud.EntityFramework/packages.config @@ -1,16 +1,17 @@  - - - - + + + + + - + - + - + \ No newline at end of file diff --git a/src/EventCloud.Web/Abp/Framework/scripts/abp.js b/src/EventCloud.Web/Abp/Framework/scripts/abp.js index 2d58921..a4874aa 100644 --- a/src/EventCloud.Web/Abp/Framework/scripts/abp.js +++ b/src/EventCloud.Web/Abp/Framework/scripts/abp.js @@ -495,9 +495,19 @@ return root; }; + /* Find and replaces a string (search) to another string (replacement) in + * given string (str). + * Example: + * abp.utils.replaceAll('This is a test string', 'is', 'X') = 'ThX X a test string' + ************************************************************/ + abp.utils.replaceAll = function (str, search, replacement) { + var fix = search.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); + return str.replace(new RegExp(fix, 'g'), replacement); + }; + /* Formats a string just like string.format in C#. * Example: - * _formatString('Hello {0}','Halil') = 'Hello Halil' + * abp.utils.formatString('Hello {0}','Tuana') = 'Hello Tuana' ************************************************************/ abp.utils.formatString = function () { if (arguments.length < 1) { @@ -508,7 +518,7 @@ for (var i = 1; i < arguments.length; i++) { var placeHolder = '{' + (i - 1) + '}'; - str = str.replace(placeHolder, arguments[i]); + str = abp.utils.replaceAll(str, placeHolder, arguments[i]); } return str; @@ -570,4 +580,121 @@ return !!(obj && obj.constructor && obj.call && obj.apply); }; -})(jQuery); \ No newline at end of file + /* TIMING *****************************************/ + abp.timing = abp.timing || {}; + + abp.timing.utcClockProvider = (function () { + + var toUtc = function (date) { + return Date.UTC( + date.getUTCFullYear() + , date.getUTCMonth() + , date.getUTCDate() + , date.getUTCHours() + , date.getUTCMinutes() + , date.getUTCSeconds() + , date.getUTCMilliseconds() + ); + } + + var now = function () { + return new Date(); + }; + + var normalize = function (date) { + if (!date) { + return date; + } + + return new Date(toUtc(date)); + }; + + // Public interface /////////////////////////////////////////////////// + + return { + now: now, + normalize: normalize + }; + })(); + + abp.timing.localClockProvider = (function () { + + var toLocal = function (date) { + return new Date( + date.getFullYear() + , date.getMonth() + , date.getDate() + , date.getHours() + , date.getMinutes() + , date.getSeconds() + , date.getMilliseconds() + ); + } + + var now = function () { + return toLocal(new Date()); + } + + var normalize = function (date) { + if (!date) { + return date; + } + + return toLocal(date); + } + + // Public interface /////////////////////////////////////////////////// + + return { + now: now, + normalize: normalize + }; + })(); + + abp.timing.unspecifiedClockProvider = (function () { + + var now = function () { + return new Date(); + } + + var normalize = function (date) { + return date; + } + + // Public interface /////////////////////////////////////////////////// + + return { + now: now, + normalize: normalize + }; + })(); + + abp.timing.convertToUserTimezone = function (date) { + var localTime = date.getTime(); + var utcTime = localTime + (date.getTimezoneOffset() * 60000); + var targetTime = parseInt(utcTime) + parseInt(abp.timing.timeZoneInfo.windows.currentUtcOffsetInMilliseconds); + return new Date(targetTime); + }; + + /* CLOCK *****************************************/ + abp.clock = abp.clock || {}; + + abp.clock.now = function () { + if (abp.clock.provider) { + return abp.clock.provider.now(); + } + + return new Date(); + } + + abp.clock.normalize = function (date) { + if (abp.clock.provider) { + return abp.clock.provider.normalize(date); + } + + return date; + } + + abp.clock.provider = abp.timing.unspecifiedClockProvider; + +})(jQuery); diff --git a/src/EventCloud.Web/Abp/Framework/scripts/libs/abp.jquery.js b/src/EventCloud.Web/Abp/Framework/scripts/libs/abp.jquery.js index b637018..f34f13b 100644 --- a/src/EventCloud.Web/Abp/Framework/scripts/libs/abp.jquery.js +++ b/src/EventCloud.Web/Abp/Framework/scripts/libs/abp.jquery.js @@ -18,10 +18,19 @@ return $.Deferred(function ($dfd) { $.ajax(options) - .done(function (data) { - abp.ajax.handleResponse(data, userOptions, $dfd); - }).fail(function () { - $dfd.reject.apply(this, arguments); + .done(function (data, textStatus, jqXHR) { + if (data.__abp) { + abp.ajax.handleResponse(data, userOptions, $dfd, jqXHR); + } else { + $dfd.resolve(data); + userOptions.success && userOptions.success(data); + } + }).fail(function (jqXHR) { + if (jqXHR.responseJSON && jqXHR.responseJSON.__abp) { + abp.ajax.handleResponse(jqXHR.responseJSON, userOptions, $dfd, jqXHR); + } else { + abp.ajax.handleNonAbpErrorResponse(jqXHR, userOptions, $dfd); + } }); }); }; @@ -34,10 +43,20 @@ }, defaultError: { - message: 'Ajax request did not succeed!', + message: 'An error has occurred!', details: 'Error detail not sent by server.' }, + defaultError401: { + message: 'You are not authenticated!', + details: 'You should be authenticated (sign in) in order to perform this operation.' + }, + + defaultError403: { + message: 'You are not authorized!', + details: 'You are not allowed to perform this operation.' + }, + logError: function (error) { abp.log.error(error); }, @@ -52,12 +71,32 @@ handleTargetUrl: function (targetUrl) { if (!targetUrl) { - location.reload(); + location.href = abp.appPath; } else { location.href = targetUrl; } }, + handleNonAbpErrorResponse: function (jqXHR, userOptions, $dfd) { + switch (jqXHR.status) { + case 401: + abp.ajax.handleUnAuthorizedRequest( + abp.ajax.showError(abp.ajax.defaultError401), + abp.appPath + ); + break; + case 403: + abp.ajax.showError(abp.ajax.defaultError403); + break; + default: + abp.ajax.showError(abp.ajax.defaultError); + break; + } + + $dfd.reject.apply(this, arguments); + userOptions.error && userOptions.error.apply(this, arguments); + }, + handleUnAuthorizedRequest: function (messagePromise, targetUrl) { if (messagePromise) { messagePromise.done(function () { @@ -68,11 +107,11 @@ } }, - handleResponse: function (data, userOptions, $dfd) { + handleResponse: function (data, userOptions, $dfd, jqXHR) { if (data) { if (data.success === true) { - $dfd && $dfd.resolve(data.result, data); - userOptions.success && userOptions.success(data.result, data); + $dfd && $dfd.resolve(data.result, data, jqXHR); + userOptions.success && userOptions.success(data.result, data, jqXHR); if (data.targetUrl) { abp.ajax.handleTargetUrl(data.targetUrl); @@ -88,19 +127,19 @@ abp.ajax.logError(data.error); - $dfd && $dfd.reject(data.error); - userOptions.error && userOptions.error(data.error); + $dfd && $dfd.reject(data.error, jqXHR); + userOptions.error && userOptions.error(data.error, jqXHR); - if (data.unAuthorizedRequest) { + if (jqXHR.status == 401) { abp.ajax.handleUnAuthorizedRequest(messagePromise, data.targetUrl); } } else { //not wrapped result - $dfd && $dfd.resolve(data); - userOptions.success && userOptions.success(data); + $dfd && $dfd.resolve(data, null, jqXHR); + userOptions.success && userOptions.success(data, null, jqXHR); } } else { //no data sent to back - $dfd && $dfd.resolve(); - userOptions.success && userOptions.success(); + $dfd && $dfd.resolve(jqXHR); + userOptions.success && userOptions.success(jqXHR); } }, @@ -163,4 +202,13 @@ }; } + abp.event.on('abp.dynamicScriptsInitialized', function () { + abp.ajax.defaultError.message = abp.localization.abpWeb('DefaultError'); + abp.ajax.defaultError.details = abp.localization.abpWeb('DefaultErrorDetail'); + abp.ajax.defaultError401.message = abp.localization.abpWeb('DefaultError401'); + abp.ajax.defaultError401.details = abp.localization.abpWeb('DefaultErrorDetail401'); + abp.ajax.defaultError403.message = abp.localization.abpWeb('DefaultError403'); + abp.ajax.defaultError403.details = abp.localization.abpWeb('DefaultErrorDetail403'); + }); + })(jQuery); \ No newline at end of file diff --git a/src/EventCloud.Web/Abp/Framework/scripts/libs/abp.moment.js b/src/EventCloud.Web/Abp/Framework/scripts/libs/abp.moment.js new file mode 100644 index 0000000..92eab9f --- /dev/null +++ b/src/EventCloud.Web/Abp/Framework/scripts/libs/abp.moment.js @@ -0,0 +1,19 @@ +var abp = abp || {}; +(function () { + if (!moment || !moment.tz) { + return; + } + + /* DEFAULTS *************************************************/ + + abp.timing = abp.timing || {}; + + /* FUNCTIONS **************************************************/ + + abp.timing.convertToUserTimezone = function (date) { + var momentDate = moment(date); + var targetDate = momentDate.clone().tz(abp.timing.timeZoneInfo.iana.timeZoneId); + return targetDate; + }; + +})(); \ No newline at end of file diff --git a/src/EventCloud.Web/Abp/Framework/scripts/libs/abp.sweet-alert.js b/src/EventCloud.Web/Abp/Framework/scripts/libs/abp.sweet-alert.js index cbafd9b..fee004b 100644 --- a/src/EventCloud.Web/Abp/Framework/scripts/libs/abp.sweet-alert.js +++ b/src/EventCloud.Web/Abp/Framework/scripts/libs/abp.sweet-alert.js @@ -97,7 +97,7 @@ return $.Deferred(function ($dfd) { sweetAlert(opts, function (isConfirmed) { callback && callback(isConfirmed); - $dfd.resolve(); + $dfd.resolve(isConfirmed); }); }); }; diff --git a/src/EventCloud.Web/Abp/Framework/scripts/libs/angularjs/abp.ng.js b/src/EventCloud.Web/Abp/Framework/scripts/libs/angularjs/abp.ng.js index 3e26304..821116c 100644 --- a/src/EventCloud.Web/Abp/Framework/scripts/libs/angularjs/abp.ng.js +++ b/src/EventCloud.Web/Abp/Framework/scripts/libs/angularjs/abp.ng.js @@ -8,10 +8,20 @@ abp.ng.http = { defaultError: { - message: 'Ajax request did not succeed!', + message: 'An error has occurred!', details: 'Error detail not sent by server.' }, + defaultError401: { + message: 'You are not authenticated!', + details: 'You should be authenticated (sign in) in order to perform this operation.' + }, + + defaultError403: { + message: 'You are not authorized!', + details: 'You are not allowed to perform this operation.' + }, + logError: function (error) { abp.log.error(error); }, @@ -25,24 +35,39 @@ }, handleTargetUrl: function (targetUrl) { - location.href = targetUrl; + if (!targetUrl) { + location.href = abp.appPath; + } else { + location.href = targetUrl; + } + }, + + handleNonAbpErrorResponse: function (response, defer) { + switch (response.status) { + case 401: + abp.ng.http.handleUnAuthorizedRequest( + abp.ng.http.showError(abp.ng.http.defaultError401), + abp.appPath + ); + break; + case 403: + abp.ng.http.showError(abp.ajax.defaultError403); + break; + default: + abp.ng.http.showError(abp.ng.http.defaultError); + break; + } + + defer.reject(response); }, handleUnAuthorizedRequest: function (messagePromise, targetUrl) { if (messagePromise) { messagePromise.done(function () { - if (!targetUrl) { - location.reload(); - } else { - abp.ng.http.handleTargetUrl(targetUrl); - } + abp.ng.http.handleTargetUrl(targetUrl || abp.appPath); }); } else { - if (!targetUrl) { - location.reload(); - } else { - abp.ng.http.handleTargetUrl(targetUrl); - } + abp.ng.http.handleTargetUrl(targetUrl || abp.appPath); } }, @@ -70,7 +95,7 @@ response.data = originalData.error; defer.reject(response); - if (originalData.unAuthorizedRequest) { + if (response.status == 401) { abp.ng.http.handleUnAuthorizedRequest(messagePromise, originalData.targetUrl); } } else { //not wrapped result @@ -96,29 +121,26 @@ }, 'response': function (response) { - if (!response.config || !response.config.abp || !response.data) { + if (!response.data || !response.data.__abp) { + //Non ABP related return value return response; } var defer = $q.defer(); - abp.ng.http.handleResponse(response, defer); - return defer.promise; }, 'responseError': function (ngError) { - var error = { - message: ngError.data || abp.ng.http.defaultError.message, - details: ngError.statusText || abp.ng.http.defaultError.details, - responseError: true - } - - abp.ng.http.showError(error); + var defer = $q.defer(); - abp.ng.http.logError(error); + if (!ngError.data || !ngError.data.__abp) { + abp.ng.http.handleNonAbpErrorResponse(ngError, defer); + } else { + abp.ng.http.handleResponse(ngError, defer); + } - return $q.reject(ngError); + return defer.promise; } }; @@ -134,4 +156,13 @@ return str.indexOf(suffix, str.length - suffix.length) !== -1; } + abp.event.on('abp.dynamicScriptsInitialized', function () { + abp.ng.http.defaultError.message = abp.localization.abpWeb('DefaultError'); + abp.ng.http.defaultError.details = abp.localization.abpWeb('DefaultErrorDetail'); + abp.ng.http.defaultError401.message = abp.localization.abpWeb('DefaultError401'); + abp.ng.http.defaultError401.details = abp.localization.abpWeb('DefaultErrorDetail401'); + abp.ng.http.defaultError403.message = abp.localization.abpWeb('DefaultError403'); + abp.ng.http.defaultError403.details = abp.localization.abpWeb('DefaultErrorDetail403'); + }); + })((abp || (abp = {})), (angular || undefined)); \ No newline at end of file diff --git a/src/EventCloud.Web/Abp/Framework/styles/abp.mixings.css.map b/src/EventCloud.Web/Abp/Framework/styles/abp.mixings.css.map new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/src/EventCloud.Web/Abp/Framework/styles/abp.mixings.css.map @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/EventCloud.Web/App_Start/EventCloudWebModule.cs b/src/EventCloud.Web/App_Start/EventCloudWebModule.cs index 7704fba..76f4161 100644 --- a/src/EventCloud.Web/App_Start/EventCloudWebModule.cs +++ b/src/EventCloud.Web/App_Start/EventCloudWebModule.cs @@ -1,19 +1,21 @@ using System.Reflection; -using System.Web; -using System.Web.Http; using System.Web.Mvc; using System.Web.Optimization; using System.Web.Routing; using Abp.Localization; -using Abp.Localization.Sources; -using Abp.Localization.Sources.Xml; using Abp.Modules; +using Abp.Web.Mvc; using EventCloud.Api; using EventCloud.Web.Navigation; namespace EventCloud.Web { - [DependsOn(typeof(EventCloudDataModule), typeof(EventCloudApplicationModule), typeof(EventCloudWebApiModule))] + [DependsOn( + typeof(EventCloudDataModule), + typeof(EventCloudApplicationModule), + typeof(EventCloudWebApiModule), + typeof(AbpWebMvcModule) + )] public class EventCloudWebModule : AbpModule { public override void PreInitialize() diff --git a/src/EventCloud.Web/EventCloud.Web.csproj b/src/EventCloud.Web/EventCloud.Web.csproj index 3ea3b33..47933f6 100644 --- a/src/EventCloud.Web/EventCloud.Web.csproj +++ b/src/EventCloud.Web/EventCloud.Web.csproj @@ -42,36 +42,44 @@ 4 - - ..\packages\Abp.0.8.0.1\lib\net461\Abp.dll + + ..\packages\Abp.0.10.0.1\lib\net452\Abp.dll True - - ..\packages\Abp.AutoMapper.0.8.0.1\lib\net461\Abp.AutoMapper.dll + + ..\packages\Abp.AutoMapper.0.10.0.1\lib\net452\Abp.AutoMapper.dll True - - ..\packages\Abp.EntityFramework.0.8.0.1\lib\net461\Abp.EntityFramework.dll + + ..\packages\Abp.EntityFramework.0.10.0.2\lib\net452\Abp.EntityFramework.dll True - - ..\packages\Abp.Web.0.8.0.1\lib\net461\Abp.Web.dll + + ..\packages\Abp.EntityFramework.Common.0.10.0.1\lib\net452\Abp.EntityFramework.Common.dll True - - ..\packages\Abp.Web.Api.0.8.0.1\lib\net461\Abp.Web.Api.dll + + ..\packages\Abp.Web.0.10.0.1\lib\net452\Abp.Web.dll True - - ..\packages\Abp.Web.Mvc.0.8.0.1\lib\net461\Abp.Web.Mvc.dll + + ..\packages\Abp.Web.Api.0.10.0.1\lib\net452\Abp.Web.Api.dll True - - ..\packages\Abp.Zero.0.8.0.1\lib\net461\Abp.Zero.dll + + ..\packages\Abp.Web.Common.0.10.0.1\lib\net452\Abp.Web.Common.dll True - - ..\packages\Abp.Zero.EntityFramework.0.8.0.1\lib\net461\Abp.Zero.EntityFramework.dll + + ..\packages\Abp.Web.Mvc.0.10.0.1\lib\net452\Abp.Web.Mvc.dll + True + + + ..\packages\Abp.Zero.0.10.0.0\lib\net452\Abp.Zero.dll + True + + + ..\packages\Abp.Zero.EntityFramework.0.10.0.0\lib\net452\Abp.Zero.EntityFramework.dll True @@ -99,8 +107,8 @@ False ..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll - - ..\packages\EntityFramework.DynamicFilters.1.4.6\lib\net40\EntityFramework.DynamicFilters.dll + + ..\packages\EntityFramework.DynamicFilters.1.4.11\lib\net40\EntityFramework.DynamicFilters.dll True @@ -152,8 +160,8 @@ ..\packages\Microsoft.Owin.Security.Twitter.3.0.1\lib\net45\Microsoft.Owin.Security.Twitter.dll True - - ..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll + + ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll True @@ -172,8 +180,8 @@ ..\packages\Owin.1.0\lib\net40\Owin.dll True - - ..\packages\System.Collections.Immutable.1.1.36\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll + + ..\packages\System.Collections.Immutable.1.2.0\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll True @@ -183,6 +191,8 @@ ..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll + + @@ -250,6 +260,7 @@ + @@ -446,6 +457,7 @@ about.css + diff --git a/src/EventCloud.Web/Global.asax.cs b/src/EventCloud.Web/Global.asax.cs index f6e66a3..9ff35cc 100644 --- a/src/EventCloud.Web/Global.asax.cs +++ b/src/EventCloud.Web/Global.asax.cs @@ -5,7 +5,7 @@ namespace EventCloud.Web { - public class MvcApplication : AbpWebApplication + public class MvcApplication : AbpWebApplication { protected override void Application_Start(object sender, EventArgs e) { diff --git a/src/EventCloud.Web/Logs/Logs.txt b/src/EventCloud.Web/Logs/Logs.txt index f11ff00..f29049d 100644 --- a/src/EventCloud.Web/Logs/Logs.txt +++ b/src/EventCloud.Web/Logs/Logs.txt @@ -6450,3 +6450,253 @@ DEBUG 2016-01-07 16:03:07,907 [1 ] Abp.Logging.LogHelper - DEBUG 2016-01-07 16:03:07,908 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'EventCloud.Statistics.IStatisticsAppService' with service name 'app/statistics'. DEBUG 2016-01-07 16:03:07,908 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'EventCloud.Users.IUserAppService' with service name 'app/user'. DEBUG 2016-01-07 16:03:07,909 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'EventCloud.Sessions.ISessionAppService' with service name 'app/session'. +DEBUG 2016-07-19 11:16:42,431 [1 ] Abp.Modules.AbpModuleManager - Loading Abp modules... +DEBUG 2016-07-19 11:16:42,443 [1 ] Abp.Modules.AbpModuleManager - Found 14 ABP modules in total. +DEBUG 2016-07-19 11:16:42,448 [1 ] Abp.Modules.AbpModuleManager - Loaded module: EventCloud.Web.EventCloudWebModule, EventCloud.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null +DEBUG 2016-07-19 11:16:42,449 [1 ] Abp.Modules.AbpModuleManager - Loaded module: EventCloud.EventCloudDataModule, EventCloud.EntityFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null +DEBUG 2016-07-19 11:16:42,450 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Zero.EntityFramework.AbpZeroEntityFrameworkModule, Abp.Zero.EntityFramework, Version=0.10.0.0, Culture=neutral, PublicKeyToken=null +DEBUG 2016-07-19 11:16:42,450 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Zero.AbpZeroCoreModule, Abp.Zero, Version=0.10.0.0, Culture=neutral, PublicKeyToken=null +DEBUG 2016-07-19 11:16:42,450 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.AbpKernelModule, Abp, Version=0.10.0.1, Culture=neutral, PublicKeyToken=null +DEBUG 2016-07-19 11:16:42,450 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.EntityFramework.AbpEntityFrameworkModule, Abp.EntityFramework, Version=0.10.0.2, Culture=neutral, PublicKeyToken=null +DEBUG 2016-07-19 11:16:42,450 [1 ] Abp.Modules.AbpModuleManager - Loaded module: EventCloud.EventCloudCoreModule, EventCloud.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null +DEBUG 2016-07-19 11:16:42,450 [1 ] Abp.Modules.AbpModuleManager - Loaded module: EventCloud.EventCloudApplicationModule, EventCloud.Application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null +DEBUG 2016-07-19 11:16:42,451 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.AutoMapper.AbpAutoMapperModule, Abp.AutoMapper, Version=0.10.0.1, Culture=neutral, PublicKeyToken=null +DEBUG 2016-07-19 11:16:42,451 [1 ] Abp.Modules.AbpModuleManager - Loaded module: EventCloud.Api.EventCloudWebApiModule, EventCloud.WebApi, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null +DEBUG 2016-07-19 11:16:42,451 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.WebApi.AbpWebApiModule, Abp.Web.Api, Version=0.10.0.1, Culture=neutral, PublicKeyToken=null +DEBUG 2016-07-19 11:16:42,451 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Web.AbpWebModule, Abp.Web, Version=0.10.0.1, Culture=neutral, PublicKeyToken=null +DEBUG 2016-07-19 11:16:42,451 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Web.AbpWebCommonModule, Abp.Web.Common, Version=0.10.0.1, Culture=neutral, PublicKeyToken=null +DEBUG 2016-07-19 11:16:42,451 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Web.Mvc.AbpWebMvcModule, Abp.Web.Mvc, Version=0.10.0.1, Culture=neutral, PublicKeyToken=null +DEBUG 2016-07-19 11:16:42,454 [1 ] Abp.Modules.AbpModuleManager - 14 modules loaded. +DEBUG 2016-07-19 11:16:42,784 [1 ] EntityFramework.AbpEntityFrameworkModule - Registering DbContext: EventCloud.EntityFramework.EventCloudDbContext, EventCloud.EntityFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null +DEBUG 2016-07-19 11:16:43,661 [1 ] Abp.Localization.LocalizationManager - Initializing 4 localization sources. +DEBUG 2016-07-19 11:16:43,667 [1 ] Abp.Localization.LocalizationManager - Initialized localization source: Abp +DEBUG 2016-07-19 11:16:43,669 [1 ] Abp.Localization.LocalizationManager - Initialized localization source: AbpZero +DEBUG 2016-07-19 11:16:43,669 [1 ] Abp.Localization.LocalizationManager - Initialized localization source: EventCloud +DEBUG 2016-07-19 11:16:43,670 [1 ] Abp.Localization.LocalizationManager - Initialized localization source: AbpWeb +DEBUG 2016-07-19 11:16:43,928 [1 ] Abp.BackgroundJobs.BackgroundJobManager - Start background worker: Abp.BackgroundJobs.BackgroundJobManager +DEBUG 2016-07-19 11:16:43,942 [1 ] Abp.AutoMapper.AbpAutoMapperModule - Found 6 classes defines auto mapping attributes +DEBUG 2016-07-19 11:16:43,942 [1 ] Abp.AutoMapper.AbpAutoMapperModule - EventCloud.Web.Models.Account.TenantSelectionViewModel+TenantInfo +DEBUG 2016-07-19 11:16:44,076 [1 ] Abp.AutoMapper.AbpAutoMapperModule - EventCloud.Sessions.Dto.TenantLoginInfoDto +DEBUG 2016-07-19 11:16:44,077 [1 ] Abp.AutoMapper.AbpAutoMapperModule - EventCloud.Sessions.Dto.UserLoginInfoDto +DEBUG 2016-07-19 11:16:44,082 [1 ] Abp.AutoMapper.AbpAutoMapperModule - EventCloud.Events.Dtos.EventListDto +DEBUG 2016-07-19 11:16:44,090 [1 ] Abp.AutoMapper.AbpAutoMapperModule - EventCloud.Events.Dtos.EventRegistrationDto +DEBUG 2016-07-19 11:16:44,091 [1 ] Abp.AutoMapper.AbpAutoMapperModule - EventCloud.Events.Dtos.EventDetailOutput +DEBUG 2016-07-19 11:16:44,168 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'EventCloud.Sessions.ISessionAppService' with service name 'app/session'. +DEBUG 2016-07-19 11:16:44,169 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'EventCloud.Users.IUserAppService' with service name 'app/user'. +DEBUG 2016-07-19 11:16:44,170 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'EventCloud.Statistics.IStatisticsAppService' with service name 'app/statistics'. +DEBUG 2016-07-19 11:16:44,170 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'EventCloud.Roles.IRoleAppService' with service name 'app/role'. +DEBUG 2016-07-19 11:16:44,172 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'EventCloud.Events.IEventAppService' with service name 'app/event'. +WARN 2016-07-19 11:19:21,372 [27 ] nHandling.AbpApiExceptionFilterAttribute - Can not register event in the past! +Abp.UI.UserFriendlyException: Can not register event in the past! + at EventCloud.Events.EventRegistrationPolicy.CheckEventDate(Event event) in D:\Halil\GitHub\sample-eventcloud\src\EventCloud.Core\Events\EventRegistrationPolicy.cs:line 34 + at EventCloud.Events.EventRegistrationPolicy.d__2.MoveNext() in D:\Halil\GitHub\sample-eventcloud\src\EventCloud.Core\Events\EventRegistrationPolicy.cs:line 26 +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.GetResult() + at EventCloud.Events.EventRegistration.d__21.MoveNext() in D:\Halil\GitHub\sample-eventcloud\src\EventCloud.Core\Events\EventRegistration.cs:line 41 +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() + at EventCloud.Events.EventManager.d__11.MoveNext() in D:\Halil\GitHub\sample-eventcloud\src\EventCloud.Core\Events\EventManager.cs:line 57 +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() + at EventCloud.Events.EventAppService.d__9.MoveNext() in D:\Halil\GitHub\sample-eventcloud\src\EventCloud.Application\Events\EventAppService.cs:line 95 +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() + at EventCloud.Events.EventAppService.d__7.MoveNext() in D:\Halil\GitHub\sample-eventcloud\src\EventCloud.Application\Events\EventAppService.cs:line 74 +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at Abp.Threading.InternalAsyncHelper.d__5`1.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp\Threading\InternalAsyncHelper.cs:line 120 +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at System.Threading.Tasks.TaskHelpersExtensions.d__3`1.MoveNext() +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at System.Web.Http.Controllers.ApiControllerActionInvoker.d__0.MoveNext() +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at Abp.WebApi.Uow.AbpApiUowFilter.d__5.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp.Web.Api\WebApi\Uow\AbpApiUowFilter.cs:line 41 +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at Abp.WebApi.Validation.AbpApiValidationFilter.d__4.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp.Web.Api\WebApi\Validation\AbpApiValidationFilter.cs:line 40 +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at Abp.WebApi.Auditing.AbpApiAuditFilter.d__25.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp.Web.Api\WebApi\Auditing\AbpApiAuditFilter.cs:line 75 +--- End of stack trace from previous location where exception was thrown --- + at Abp.WebApi.Auditing.AbpApiAuditFilter.d__25.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp.Web.Api\WebApi\Auditing\AbpApiAuditFilter.cs:line 82 +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at System.Web.Http.Controllers.ActionFilterResult.d__2.MoveNext() +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at System.Web.Http.Controllers.AuthenticationFilterResult.d__0.MoveNext() +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at System.Web.Http.Controllers.ExceptionFilterResult.d__0.MoveNext() +ERROR 2016-07-19 11:19:41,401 [20 ] nHandling.AbpApiExceptionFilterAttribute - Session.TenantId is null! Possible problems: No user logged in or current logged in user in a host user (TenantId is always null for host users). +Abp.AbpException: Session.TenantId is null! Possible problems: No user logged in or current logged in user in a host user (TenantId is always null for host users). + at Abp.Runtime.Session.AbpSessionExtensions.GetTenantId(IAbpSession session) in D:\Halil\GitHub\aspnetboilerplate\src\Abp\Runtime\Session\AbpSessionExtensions.cs:line 37 + at EventCloud.Events.EventAppService.d__5.MoveNext() in D:\Halil\GitHub\sample-eventcloud\src\EventCloud.Application\Events\EventAppService.cs:line 62 +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at Abp.Threading.InternalAsyncHelper.d__1.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp\Threading\InternalAsyncHelper.cs:line 40 +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at System.Threading.Tasks.TaskHelpersExtensions.d__0.MoveNext() +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at System.Web.Http.Controllers.ApiControllerActionInvoker.d__0.MoveNext() +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at Abp.WebApi.Uow.AbpApiUowFilter.d__5.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp.Web.Api\WebApi\Uow\AbpApiUowFilter.cs:line 41 +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at Abp.WebApi.Validation.AbpApiValidationFilter.d__4.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp.Web.Api\WebApi\Validation\AbpApiValidationFilter.cs:line 40 +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at Abp.WebApi.Auditing.AbpApiAuditFilter.d__25.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp.Web.Api\WebApi\Auditing\AbpApiAuditFilter.cs:line 75 +--- End of stack trace from previous location where exception was thrown --- + at Abp.WebApi.Auditing.AbpApiAuditFilter.d__25.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp.Web.Api\WebApi\Auditing\AbpApiAuditFilter.cs:line 82 +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at System.Web.Http.Controllers.ActionFilterResult.d__2.MoveNext() +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at System.Web.Http.Controllers.AuthenticationFilterResult.d__0.MoveNext() +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at System.Web.Http.Controllers.ExceptionFilterResult.d__0.MoveNext() +DEBUG 2016-07-19 11:21:27,246 [49 ] ud.Events.Notifications.EventUserEmailer - TODO: Send email to admin@aspnetboilerplate.com -> Hey! There is a new event 'Halil test 2' on 7/20/2016 9:00:00 AM! Want to register? +DEBUG 2016-07-19 11:23:24,404 [16 ] ud.Events.Notifications.EventUserEmailer - TODO: Send email to admin@aspnetboilerplate.com -> Halil test 2 event is canceled! +WARN 2016-07-19 11:23:48,206 [58 ] nHandling.AbpApiExceptionFilterAttribute - Can not register event in the past! +Abp.UI.UserFriendlyException: Can not register event in the past! + at EventCloud.Events.EventRegistrationPolicy.CheckEventDate(Event event) in D:\Halil\GitHub\sample-eventcloud\src\EventCloud.Core\Events\EventRegistrationPolicy.cs:line 34 + at EventCloud.Events.EventRegistrationPolicy.d__2.MoveNext() in D:\Halil\GitHub\sample-eventcloud\src\EventCloud.Core\Events\EventRegistrationPolicy.cs:line 26 +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.GetResult() + at EventCloud.Events.EventRegistration.d__21.MoveNext() in D:\Halil\GitHub\sample-eventcloud\src\EventCloud.Core\Events\EventRegistration.cs:line 41 +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() + at EventCloud.Events.EventManager.d__11.MoveNext() in D:\Halil\GitHub\sample-eventcloud\src\EventCloud.Core\Events\EventManager.cs:line 57 +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() + at EventCloud.Events.EventAppService.d__9.MoveNext() in D:\Halil\GitHub\sample-eventcloud\src\EventCloud.Application\Events\EventAppService.cs:line 95 +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() + at EventCloud.Events.EventAppService.d__7.MoveNext() in D:\Halil\GitHub\sample-eventcloud\src\EventCloud.Application\Events\EventAppService.cs:line 74 +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at Abp.Threading.InternalAsyncHelper.d__5`1.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp\Threading\InternalAsyncHelper.cs:line 120 +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at System.Threading.Tasks.TaskHelpersExtensions.d__3`1.MoveNext() +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at System.Web.Http.Controllers.ApiControllerActionInvoker.d__0.MoveNext() +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at Abp.WebApi.Uow.AbpApiUowFilter.d__5.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp.Web.Api\WebApi\Uow\AbpApiUowFilter.cs:line 41 +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at Abp.WebApi.Validation.AbpApiValidationFilter.d__4.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp.Web.Api\WebApi\Validation\AbpApiValidationFilter.cs:line 40 +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at Abp.WebApi.Auditing.AbpApiAuditFilter.d__25.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp.Web.Api\WebApi\Auditing\AbpApiAuditFilter.cs:line 75 +--- End of stack trace from previous location where exception was thrown --- + at Abp.WebApi.Auditing.AbpApiAuditFilter.d__25.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp.Web.Api\WebApi\Auditing\AbpApiAuditFilter.cs:line 82 +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at System.Web.Http.Controllers.ActionFilterResult.d__2.MoveNext() +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at System.Web.Http.Controllers.AuthenticationFilterResult.d__0.MoveNext() +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at System.Web.Http.Controllers.ExceptionFilterResult.d__0.MoveNext() +WARN 2016-07-19 11:23:52,175 [52 ] nHandling.AbpApiExceptionFilterAttribute - This event was in the past +Abp.UI.UserFriendlyException: This event was in the past + at EventCloud.Events.Event.AssertNotInPast() in D:\Halil\GitHub\sample-eventcloud\src\EventCloud.Core\Events\Event.cs:line 120 + at EventCloud.Events.Event.Cancel() in D:\Halil\GitHub\sample-eventcloud\src\EventCloud.Core\Events\Event.cs:line 95 + at EventCloud.Events.EventManager.Cancel(Event event) in D:\Halil\GitHub\sample-eventcloud\src\EventCloud.Core\Events\EventManager.cs:line 51 + at EventCloud.Events.EventAppService.d__6.MoveNext() in D:\Halil\GitHub\sample-eventcloud\src\EventCloud.Application\Events\EventAppService.cs:line 69 +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at Abp.Threading.InternalAsyncHelper.d__1.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp\Threading\InternalAsyncHelper.cs:line 40 +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at System.Threading.Tasks.TaskHelpersExtensions.d__0.MoveNext() +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at System.Web.Http.Controllers.ApiControllerActionInvoker.d__0.MoveNext() +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at Abp.WebApi.Uow.AbpApiUowFilter.d__5.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp.Web.Api\WebApi\Uow\AbpApiUowFilter.cs:line 41 +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at Abp.WebApi.Validation.AbpApiValidationFilter.d__4.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp.Web.Api\WebApi\Validation\AbpApiValidationFilter.cs:line 40 +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at Abp.WebApi.Auditing.AbpApiAuditFilter.d__25.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp.Web.Api\WebApi\Auditing\AbpApiAuditFilter.cs:line 75 +--- End of stack trace from previous location where exception was thrown --- + at Abp.WebApi.Auditing.AbpApiAuditFilter.d__25.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp.Web.Api\WebApi\Auditing\AbpApiAuditFilter.cs:line 82 +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at System.Web.Http.Controllers.ActionFilterResult.d__2.MoveNext() +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at System.Web.Http.Controllers.AuthenticationFilterResult.d__0.MoveNext() +--- End of stack trace from previous location where exception was thrown --- + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at System.Web.Http.Controllers.ExceptionFilterResult.d__0.MoveNext() +DEBUG 2016-07-19 11:26:25,281 [69 ] ud.Events.Notifications.EventUserEmailer - TODO: Send email to emre@kalkan.com -> Hey! There is a new event 'asd' on 7/20/2016 9:00:00 AM! Want to register? +DEBUG 2016-07-19 11:26:37,932 [58 ] ud.Events.Notifications.EventUserEmailer - TODO: Send email to emre@kalkan.com -> Hey! There is a new event 'asd2' on 7/20/2016 9:00:00 AM! Want to register? diff --git a/src/EventCloud.Web/Models/Account/RegisterTenantViewModel.cs b/src/EventCloud.Web/Models/Account/RegisterTenantViewModel.cs index 19938a0..87251df 100644 --- a/src/EventCloud.Web/Models/Account/RegisterTenantViewModel.cs +++ b/src/EventCloud.Web/Models/Account/RegisterTenantViewModel.cs @@ -1,11 +1,10 @@ using System.ComponentModel.DataAnnotations; -using Abp.Application.Services.Dto; using EventCloud.MultiTenancy; using EventCloud.Users; namespace EventCloud.Web.Models.Account { - public class RegisterTenantViewModel : IInputDto + public class RegisterTenantViewModel { [Required] [StringLength(Tenant.MaxTenancyNameLength)] diff --git a/src/EventCloud.Web/Models/Account/RegisterViewModel.cs b/src/EventCloud.Web/Models/Account/RegisterViewModel.cs index ee126af..aaaac53 100644 --- a/src/EventCloud.Web/Models/Account/RegisterViewModel.cs +++ b/src/EventCloud.Web/Models/Account/RegisterViewModel.cs @@ -1,11 +1,10 @@ using System.ComponentModel.DataAnnotations; -using Abp.Application.Services.Dto; using EventCloud.MultiTenancy; using EventCloud.Users; namespace EventCloud.Web.Models.Account { - public class RegisterViewModel : IInputDto + public class RegisterViewModel { /// /// Not required for single-tenant applications. diff --git a/src/EventCloud.Web/Web.config b/src/EventCloud.Web/Web.config index 039ca42..598017b 100644 --- a/src/EventCloud.Web/Web.config +++ b/src/EventCloud.Web/Web.config @@ -62,7 +62,7 @@ - + diff --git a/src/EventCloud.Web/packages.config b/src/EventCloud.Web/packages.config index ca81d40..bb3162c 100644 --- a/src/EventCloud.Web/packages.config +++ b/src/EventCloud.Web/packages.config @@ -1,14 +1,16 @@  - - - - - - - - - + + + + + + + + + + + @@ -22,7 +24,7 @@ - + @@ -52,10 +54,10 @@ - + - + diff --git a/src/EventCloud.WebApi/EventCloud.WebApi.csproj b/src/EventCloud.WebApi/EventCloud.WebApi.csproj index e44cf95..34cbe4b 100644 --- a/src/EventCloud.WebApi/EventCloud.WebApi.csproj +++ b/src/EventCloud.WebApi/EventCloud.WebApi.csproj @@ -33,24 +33,28 @@ 4 - - ..\packages\Abp.0.8.0.1\lib\net461\Abp.dll + + ..\packages\Abp.0.10.0.1\lib\net452\Abp.dll True - - ..\packages\Abp.AutoMapper.0.8.0.1\lib\net461\Abp.AutoMapper.dll + + ..\packages\Abp.AutoMapper.0.10.0.1\lib\net452\Abp.AutoMapper.dll True - - ..\packages\Abp.Web.0.8.0.1\lib\net461\Abp.Web.dll + + ..\packages\Abp.Web.0.10.0.1\lib\net452\Abp.Web.dll True - - ..\packages\Abp.Web.Api.0.8.0.1\lib\net461\Abp.Web.Api.dll + + ..\packages\Abp.Web.Api.0.10.0.1\lib\net452\Abp.Web.Api.dll True - - ..\packages\Abp.Zero.0.8.0.1\lib\net461\Abp.Zero.dll + + ..\packages\Abp.Web.Common.0.10.0.1\lib\net452\Abp.Web.Common.dll + True + + + ..\packages\Abp.Zero.0.10.0.0\lib\net452\Abp.Zero.dll True @@ -85,8 +89,8 @@ ..\packages\Microsoft.Owin.Security.OAuth.3.0.1\lib\net45\Microsoft.Owin.Security.OAuth.dll True - - ..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll + + ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll True @@ -106,17 +110,21 @@ True - - ..\packages\System.Collections.Immutable.1.1.36\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll + + ..\packages\System.Collections.Immutable.1.2.0\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll True + False ..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll + + + False ..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll diff --git a/src/EventCloud.WebApi/app.config b/src/EventCloud.WebApi/app.config index d7d7577..42fa423 100644 --- a/src/EventCloud.WebApi/app.config +++ b/src/EventCloud.WebApi/app.config @@ -4,7 +4,7 @@ - + diff --git a/src/EventCloud.WebApi/packages.config b/src/EventCloud.WebApi/packages.config index 5de1368..4e3faba 100644 --- a/src/EventCloud.WebApi/packages.config +++ b/src/EventCloud.WebApi/packages.config @@ -1,10 +1,11 @@  - - - - - + + + + + + @@ -18,8 +19,8 @@ - + - + \ No newline at end of file diff --git a/src/Tests/EventCloud.Tests/EventCloud.Tests.csproj b/src/Tests/EventCloud.Tests/EventCloud.Tests.csproj index 36cb587..2114d23 100644 --- a/src/Tests/EventCloud.Tests/EventCloud.Tests.csproj +++ b/src/Tests/EventCloud.Tests/EventCloud.Tests.csproj @@ -36,28 +36,32 @@ 4 - - ..\..\packages\Abp.0.8.0.1\lib\net461\Abp.dll + + ..\..\packages\Abp.0.10.0.1\lib\net452\Abp.dll True - - ..\..\packages\Abp.AutoMapper.0.8.0.1\lib\net461\Abp.AutoMapper.dll + + ..\..\packages\Abp.AutoMapper.0.10.0.1\lib\net452\Abp.AutoMapper.dll True - - ..\..\packages\Abp.EntityFramework.0.8.0.1\lib\net461\Abp.EntityFramework.dll + + ..\..\packages\Abp.EntityFramework.0.10.0.2\lib\net452\Abp.EntityFramework.dll True - - ..\..\packages\Abp.TestBase.0.8.0.1\lib\net461\Abp.TestBase.dll + + ..\..\packages\Abp.EntityFramework.Common.0.10.0.1\lib\net452\Abp.EntityFramework.Common.dll True - - ..\..\packages\Abp.Zero.0.8.0.1\lib\net461\Abp.Zero.dll + + ..\..\packages\Abp.TestBase.0.10.0.1\lib\net452\Abp.TestBase.dll True - - ..\..\packages\Abp.Zero.EntityFramework.0.8.0.1\lib\net461\Abp.Zero.EntityFramework.dll + + ..\..\packages\Abp.Zero.0.10.0.0\lib\net452\Abp.Zero.dll + True + + + ..\..\packages\Abp.Zero.EntityFramework.0.10.0.0\lib\net452\Abp.Zero.EntityFramework.dll True @@ -77,15 +81,15 @@ True - ..\..\packages\Effort.EF6.1.1.4\lib\net45\Effort.dll + ..\..\packages\Effort.EF6.1.1.5\lib\net45\Effort.dll True ..\..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll True - - ..\..\packages\EntityFramework.DynamicFilters.1.4.6\lib\net40\EntityFramework.DynamicFilters.dll + + ..\..\packages\EntityFramework.DynamicFilters.1.4.11\lib\net40\EntityFramework.DynamicFilters.dll True @@ -96,8 +100,8 @@ ..\..\packages\Microsoft.AspNet.Identity.Core.2.2.1\lib\net45\Microsoft.AspNet.Identity.Core.dll True - - ..\..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll + + ..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll True @@ -116,21 +120,23 @@ ..\..\packages\NMemory.1.1.2\lib\net45\NMemory.dll True - - ..\..\packages\NSubstitute.1.9.2.0\lib\net45\NSubstitute.dll + + ..\..\packages\NSubstitute.1.10.0.0\lib\net45\NSubstitute.dll True - - ..\..\packages\Shouldly.2.6.0\lib\net40\Shouldly.dll + + ..\..\packages\Shouldly.2.8.0\lib\net40\Shouldly.dll True - - ..\..\packages\System.Collections.Immutable.1.1.36\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll + + ..\..\packages\System.Collections.Immutable.1.2.0\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll True + + @@ -158,6 +164,7 @@ + diff --git a/src/Tests/EventCloud.Tests/EventCloudTestModule.cs b/src/Tests/EventCloud.Tests/EventCloudTestModule.cs new file mode 100644 index 0000000..ff9be63 --- /dev/null +++ b/src/Tests/EventCloud.Tests/EventCloudTestModule.cs @@ -0,0 +1,15 @@ +using Abp.Modules; +using Abp.TestBase; + +namespace EventCloud.Tests +{ + [DependsOn( + typeof(EventCloudApplicationModule), + typeof(EventCloudDataModule), + typeof(AbpTestBaseModule) + )] + public class EventCloudTestModule : AbpModule + { + + } +} \ No newline at end of file diff --git a/src/Tests/EventCloud.Tests/Sessions/EventCloudTestBase.cs b/src/Tests/EventCloud.Tests/Sessions/EventCloudTestBase.cs index 9ffbe54..0b05e60 100644 --- a/src/Tests/EventCloud.Tests/Sessions/EventCloudTestBase.cs +++ b/src/Tests/EventCloud.Tests/Sessions/EventCloudTestBase.cs @@ -6,7 +6,6 @@ using Abp.Collections; using Abp.Configuration.Startup; using Abp.Events.Bus; -using Abp.Modules; using Abp.Runtime.Session; using Abp.TestBase; using EventCloud.EntityFramework; @@ -20,7 +19,7 @@ namespace EventCloud.Tests.Sessions { - public abstract class EventCloudTestBase : AbpIntegratedTestBase + public abstract class EventCloudTestBase : AbpIntegratedTestBase { static EventCloudTestBase() { @@ -49,15 +48,6 @@ protected override void PreInitialize() ); } - protected override void AddModules(ITypeList modules) - { - base.AddModules(modules); - - //Adding testing modules. Depended modules of these modules are automatically added. - modules.Add(); - modules.Add(); - } - public void UsingDbContext(Action action) { using (var context = LocalIocManager.Resolve()) @@ -67,7 +57,7 @@ public void UsingDbContext(Action action) context.SaveChanges(); } } - + public async Task UsingDbContext(Func action) { using (var context = LocalIocManager.Resolve()) diff --git a/src/Tests/EventCloud.Tests/packages.config b/src/Tests/EventCloud.Tests/packages.config index cbd1450..01b34fb 100644 --- a/src/Tests/EventCloud.Tests/packages.config +++ b/src/Tests/EventCloud.Tests/packages.config @@ -1,25 +1,26 @@  - - - - - - + + + + + + + - + - + - + - - - + + +