Esempio n. 1
0
        public async Task <IActionResult> DeleteAsync(int id)
        {
            var result = await
                         _manager
                         .DeleteAsync(id);

            return(Ok(result
                ? ServiceResponseHelper.GetSuccessResponse(result)
                : ServiceResponseHelper.GetFailureResponse <bool>()));
        }
Esempio n. 2
0
        public async Task <IActionResult> UpdateAsync(DepartmentUpdateModel department)
        {
            var result = await
                         _manager
                         .UpdateAsync(department);

            return(Ok(result
                ? ServiceResponseHelper.GetSuccessResponse(result)
                : ServiceResponseHelper.GetFailureResponse <bool>()));
        }