Пример #1
0
 // DELETE: api/BookingLight/5
 public void Delete(int id)
 {
     try
     {
         BookingLightDAL.Delete(id);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Пример #2
0
 // POST: api/BookingLight
 public void Post([FromBody] BookingLight value)
 {
     try
     {
         BookingLightDAL.Insert(value);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Пример #3
0
 // PUT: api/BookingLight/5
 public void Put(string id, [FromBody] BookingLight value)
 {
     try
     {
         BookingLightDAL.Update(id, value);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Пример #4
0
        // GET: api/BookingLight
        public IEnumerable <BookingLight> Get()
        {
            List <BookingLight> data = null;

            try {
                data = BookingLightDAL.GetAll();
            }
            catch (Exception ex) {
                throw ex;
            }

            return(data);
        }