Пример #1
0
        public async Task <IdentityResult> UpdateRole(Model.Identity.Action action)
        {
            if (await connection.UpdateAsync(action))
            {
                return(IdentityResult.Success);
            }

            return(IdentityResult.Failed(new IdentityError {
                Description = $"Could not update action {action.Name}."
            }));
        }
Пример #2
0
        public async Task <IdentityResult> AddAction(Model.Identity.Action action)
        {
            if (await connection.InsertAsync(action) > 0)
            {
                return(IdentityResult.Success);
            }

            return(IdentityResult.Failed(new IdentityError {
                Description = $"Could not insert action {action.Name}."
            }));
        }