Exemplo n.º 1
0
        public virtual async Task <ActionResult <User> > DeleteUser([FromRoute] int userId)
        {
            LogEnter("DeleteUser", userId);
            ActionResult <User> result;

            if (userId > 0)
            {
                await _repo.DeleteMemberAsync(userId);

                result = Ok();
            }
            else
            {
                result = BadRequest();
            }
            LogEnter("DeleteUser", result);
            return(result);
        }
Exemplo n.º 2
0
        public async Task <IActionResult> DeleteConfirmed(Guid id)
        {
            await _repository.DeleteMemberAsync(id);

            return(RedirectToAction(nameof(Index)));
        }