Exemplo n.º 1
0
        public void TestGetGuestsByConferenceId()
        {
            var result = bll.GetGuestsByConferenceId(1);

            Assert.AreEqual(1, result.FirstOrDefault().ConferenceId);
            result = bll.GetGuestsByConferenceId(0);
            Assert.AreEqual(null, result.FirstOrDefault());
        }
Exemplo n.º 2
0
        public IHttpActionResult GetGuestsByConferenceId(int conferenceid)
        {
            var receiver = _bll.GetGuestsByConferenceId(conferenceid);

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