示例#1
0
        public void TestGetAccommodationInfoByConferenceId()
        {
            var result = bll.GetAccommodationInfoByConferenceId(1);

            Assert.AreEqual(1, result.FirstOrDefault().AccommodationInfoId);
            result = bll.GetAccommodationInfoByConferenceId(0);
            Assert.AreEqual(null, result.FirstOrDefault());
        }
        public IHttpActionResult GetAccommodationInfoByConferenceId(int conferenceid)
        {
            var accommodation = _bll.GetAccommodationInfoByConferenceId(conferenceid);

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