public async Task <IActionResult> Delete(int id) { var permissionType = await _service.GetById(id); if (permissionType == null) { return(NotFound()); } await _service.Remove(permissionType); return(NoContent()); }