public static UserDto ToDto(this VmUserAddorEdit vm) { return(new UserDto { Id = vm.Id, Name = vm.Name, Password = vm.Password, DisplayName = vm.DisplayName, Email = vm.Email, Enabled = vm.Enabled, Version = vm.Version }); }
public ActionResult Save(VmUserAddorEdit vm) { _userService.AddorUpdate(vm.ToDto()); return AjaxOkResponse("保存成功!"); }