public async Task <IActionResult> Delete(int id) { var restriction = await _restrictionRepository.GetAsync(id); if (!await _restrictionRepository.RemoveAsync(restriction)) { //_logger.LogError($"Delete User is not valid. Error in SaveAsync(). When accessing to UserController/Delete"); return(StatusCode(500, "A problem happend while handling your request.")); } //TODO: Implement Realistic Implementation return(Ok()); }