public async Task <CommandResult <int> > Handle(UserSaveCommand request, CancellationToken cancellationToken) { try { var userId = await _repo.Save(request.Model).ConfigureAwait(false); return(await Task.FromResult <CommandResult <int> >(new CommandResult <int>() { Message = "Created successfully", Status = true, ResponseObj = userId }).ConfigureAwait(false)); } catch (System.Exception ex) { throw; } }
public UserViewModel() { UsrSaveCommand = new UserSaveCommand(this); usrClearCommand = new UserClearCommand(this); Roles = GetAllRoles(); }