Exemplo n.º 1
0
        public async Task <string> UpdateAdminUserAsync(SaveAdminUserCommand cmd)
        {
            var msgCode = CheckUserDTO(cmd.User);

            if (!msgCode.IsSuccess())
            {
                return(msgCode);
            }
            // ^^^^^^^^^^

            var user = await UserDAL.GetUserAsync(cmd.User.ID).ConfigureAwait(false);

            if (user.IsNull())
            {
                return(MsgCodes.UserNotExists);
            }
            // ^^^^^^^^^^

            return(await UserDAL.UpdateUserAsync(cmd.User).ConfigureAwait(false));
        }
 public Task <string> UpdateUserAsync(SaveAdminUserCommand cmd) => base.RequestAsync(cmd);