public HttpResponseMessage One(string name) { var wonder = WonderFactory.All().FirstOrDefault(w => string.CompareOrdinal(w.Name, name) == 0); return(wonder != default(Wonder) ? Request.CreateResponse(HttpStatusCode.OK, wonder) : Request.CreateErrorResponse(HttpStatusCode.NoContent, $"Failed to find a wonder with name {name}")); }
public HttpResponseMessage All() { return(Request.CreateResponse(HttpStatusCode.OK, WonderFactory.All())); }