Example #1
0
        public HttpResponseMessage Get(string censusHouseNumber)
        {
            HouseDto result = _houseService.GetHouseByCHN(censusHouseNumber.Trim().ToLower());

            if (result != null)
            {
                return(Request.CreateResponse(HttpStatusCode.OK, result));
            }
            return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, "Not a valid census house number"));
        }