コード例 #1
0
        private PermissionRemoved On(PermissionRemoved permissionRemoved)
        {
            Guard.AgainstNull(permissionRemoved, nameof(permissionRemoved));

            _permissions.Remove(permissionRemoved.Permission);

            return(permissionRemoved);
        }
コード例 #2
0
        void HandleEvent(PermissionRemoved evt)
        {
            const string sql = @"
delete from  core_AxxxpplicationPermission
where   Id = @Id
;
";

            DbConnection.Execute(sql, new
            {
                AppId        = evt.AppId.Id,
                PermissionId = evt.PermissionId.Id
            }, DbTransaction);
        }
コード例 #3
0
        public IQuery PermissionRemoved(Guid id, PermissionRemoved domainEvent)
        {
            return(RawQuery.Create(@"
delete 
from 
    [dbo].[SystemRolePermission]
where	
    [RoleId] = @RoleId
and
	[Permission] = @Permission
")
                   .AddParameterValue(SystemRolePermissionColumns.RoleId, id)
                   .AddParameterValue(SystemRolePermissionColumns.Permission, domainEvent.Permission));
        }
コード例 #4
0
 public void PermissionRemoved(PrimitiveEvent primitiveEvent, PermissionRemoved domainEvent)
 {
     _databaseGateway.ExecuteUsing(_queryFactory.PermissionRemoved(primitiveEvent.Id, domainEvent));
 }
コード例 #5
0
 void When(PermissionRemoved e)
 {
     _permissionIds.Remove(e.PermissionId);
 }