예제 #1
0
        public void TestGetAccommodationInfoById()
        {
            var result = bll.GetAccommodationInfoById(1);

            Assert.AreEqual("No City", result.City);
            result = bll.GetAccommodationInfoById(0);
            Assert.AreEqual(result, null);
        }
        public IHttpActionResult GetAccommodationInfoById(int accommodationinfoid)
        {
            var accommodation = _bll.GetAccommodationInfoById(accommodationinfoid);

            if (accommodation == null)
            {
                return(BadRequest());
            }
            return(Ok(accommodation));
        }