Пример #1
0
 public IHttpActionResult GetPlaces([FromUri] PlaceFilterInfo placeFilterInfo)
 {
     return(this.Ok(new
     {
         Places = repository.Get(PlaceFilterInfoConverter.Convert(placeFilterInfo))
     }));
 }
        public IHttpActionResult GetPlaces([FromUri] PlaceFilterInfo placeFilterInfo)
        {
            if (!ModelState.IsValid)
            {
                return(this.BadRequest(ModelState));
            }
            if (placeFilterInfo == null)
            {
                return(this.BadRequest("Body must be not null"));
            }

            return(Ok(new
            {
                Places = repository.Get(PlaceFilterInfoConverter.Convert(placeFilterInfo))
            }));
        }