public IHttpActionResult GetDirection(int id) { //Direction direction = var direction = _directionService.GetDirectionById(id); if (direction == null) { return(NotFound()); } var directionModel = ModelFactory.Create(direction); return(Ok(directionModel)); }