public async Task <ActionResult <Column> > GetSingleColumn(int id) { try { var column = await ColumnService.GetSingleColumnAsync(id); return(column != null ? column : NotFound()); } catch (Exception e) { if (e is ArgumentNullException) { return(Problem("Database not found", statusCode: 500)); } if (e is InvalidOperationException) { return(Problem("There is more than one column with the given id.", statusCode: 500)); } else { return(Problem(statusCode: 500)); } } }