public async Task <IResultModel> Update(RoleUserUpdateModel model) { var entity = await _roleUserRepository.FirstAsync(model.Id); if (entity == null) { return(ResultModel.NotExists); } _mapper.Map(model, entity); var result = await _roleUserRepository.UpdateAsync(entity); return(ResultModel.Result(result)); }