public void UpdateModule(UpdateModuleInput input) { input.Validate(); var entity = _accountRepository.GetById <Sys_Module>(input.Id); AceMapper.Map(input, entity); _accountRepository.Update(entity); }
public void Update(UpdateModuleInput input) { input.Validate(); var now = DateTime.Now; this.DbContext.Update <Sys_Module>(a => a.Id == input.Id, a => new Sys_Module() { ParentId = input.ParentId, Name = input.Name, Icon = input.Icon, UrlAddress = input.UrlAddress, OpenTarget = input.OpenTarget, IsMenu = input.IsMenu, IsExpand = input.IsExpand, IsPublic = input.IsPublic, SortCode = input.SortCode, Description = input.Description, IsEnabled = input.IsEnabled, LastModifyTime = now, LastModifyUserId = this.Session.UserId, }); }
public void Update(UpdateModuleInput input) { input.Validate(); this.DbContext.UpdateFromDto <Sys_Module, UpdateModuleInput>(input); }