Beispiel #1
0
        public async Task <IResponseOutput> UpdateGroupAsync(PermissionUpdateGroupInput input)
        {
            if (!string.IsNullOrWhiteSpace(input?.Id))
            {
                var entity = await _permissionRepo.FindByIdAsync(input.Id);

                entity = ObjectMapper.Map(input, entity);
                await _permissionRepo.UpdateAsync(entity);
            }
            return(ResponseOutput.Ok());
        }
Beispiel #2
0
        public async Task <IResponseOutput> UpdateGroupAsync(PermissionUpdateGroupInput input)
        {
            var result = false;

            if (input != null && input.Id > 0)
            {
                var entity = await _permissionRepository.GetAsync(input.Id);

                entity = _mapper.Map(input, entity);
                result = (await _permissionRepository.UpdateAsync(entity)) > 0;
            }

            return(ResponseOutput.Result(result));
        }
Beispiel #3
0
 public async Task <IResultModel> UpdateGroup(PermissionUpdateGroupInput input)
 {
     return(await _permissionServices.UpdateGroupAsync(input));
 }