public async Task <IActionResult> DeleteAsync(int id)
        {
            var result = await universityService.DeleteAsync(id);

            if (!result.Success)
            {
                return(BadRequest(result));
            }
            return(Ok(result));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> DeleteAsync(int universityId)
        {
            var result = await _universityService.DeleteAsync(universityId);

            if (!result.Success)
            {
                return(BadRequest(result.Message));
            }
            var universityResource = _mapper.Map <University, UniversityResource>(result.Resource);

            return(Ok(universityResource));
        }