public async Task <IResponseOutput> UpdateApiAsync(PermissionUpdateApiInput 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());
            }
            return(ResponseOutput.NotOk());
        }
        public async Task <IResponseOutput> UpdateApiAsync(PermissionUpdateApiInput 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));
        }
Exemple #3
0
 public async Task <IResponseOutput> UpdateApi(PermissionUpdateApiInput input)
 {
     return(await _permissionServices.UpdateApiAsync(input));
 }
Exemple #4
0
 public async Task <IResultModel> UpdateApi(PermissionUpdateApiInput input)
 {
     return(await _permissionServices.UpdateApiAsync(input));
 }