public IHttpActionResult GetPublishings(string publishingType) { var publishingsByType = publishingService.GetPublishingsByType(publishingType); if (publishingsByType != null) { return(Ok(publishingsByType.Select(p => new { p.Id, p.Title }))); } else { return(StatusCode(HttpStatusCode.NoContent)); } }