public async Task <IActionResult> PostTrail(TrailDto trail) { try { var newTrail = await repository.Add(trail); return(Ok()); } catch (ArgumentNullException e) { var paramName = e.ParamName; if (paramName != null) { return(NotFound(paramName)); } throw; } }