Esempio n. 1
0
        public IHttpActionResult GetAvailableRooms(int buildingId, [FromBody] DateModel dateModel, int roomId)
        {
            var rooms = _bll.GetAvailableRooms(buildingId, dateModel.beginDate, dateModel.endDate, roomId);

            if (rooms == null)
            {
                return(BadRequest());
            }
            return(Ok(rooms));
        }
Esempio n. 2
0
        public void TestAvailableRooms1()
        {
            var result = bll.GetAvailableRooms(1, new DateTime(2018, 11, 20, 15, 0, 0), new DateTime(2018, 11, 20, 16, 0, 0), 0);

            Assert.AreEqual(0, result.Count());
        }