// GET: api/Booking public IEnumerable<Booking> GetBookings() { DALServiceGateway<IEnumerable<Booking>> gate = new DALServiceGateway<IEnumerable<Booking>>(); var bookings = gate.GetItems("api/Booking/"); return bookings; }
// GET: api/Menu public IEnumerable<Menu> GetMenus() { DALServiceGateway<IEnumerable<Menu>> gate = new DALServiceGateway<IEnumerable<Menu>>(); var menus = gate.GetItems("api/Menu/"); return menus; }
// GET: api/Category public IEnumerable<Category> GetCategories() { DALServiceGateway<IEnumerable<Category>> gate = new DALServiceGateway<IEnumerable<Category>>(); var categories = gate.GetItems("api/Category/"); return categories; }
// GET: api/HomePics public IEnumerable<HomePic> GetHomePics() { DALServiceGateway<IEnumerable<HomePic>> gate = new DALServiceGateway<IEnumerable<HomePic>>(); var homepics = gate.GetItems("api/HomePics/"); return homepics; }
// GET: api/Food public IEnumerable<Food> GetFoods() { DALServiceGateway<IEnumerable<Food>> gate = new DALServiceGateway<IEnumerable<Food>>(); var foods = gate.GetItems("api/Food/"); return foods; }
public IHttpActionResult GetBooking(int id) { DALServiceGateway<Booking> gate = new DALServiceGateway<Booking>(); Booking item = gate.GetItems("api/Booking/" + id + ""); if (item == null) { return NotFound(); } return Ok(item); }
public IHttpActionResult GetMenu(int id) { DALServiceGateway<Menu> gate = new DALServiceGateway<Menu>(); Menu item = gate.GetItems("api/Menu/" + id + ""); if (item == null) { return NotFound(); } return Ok(item); }
public IHttpActionResult GetCategory(int id) { DALServiceGateway<Category> gate = new DALServiceGateway<Category>(); Category item = gate.GetItems("api/Category/" + id + ""); if (item == null) { return NotFound(); } return Ok(item); }
public IHttpActionResult GetHomePic(int id) { DALServiceGateway<HomePic> gate = new DALServiceGateway<HomePic>(); HomePic item = gate.GetItems("api/HomePics/" + id + ""); if (item == null) { return NotFound(); } return Ok(item); }
public IHttpActionResult GetFood(int id) { DALServiceGateway<Food> gate = new DALServiceGateway<Food>(); Food item = gate.GetItems("api/Food/" + id + ""); if (item == null) { return NotFound(); } return Ok(item); }
// GET: api/Menu?Typeid=1&CategoryId=2 public IEnumerable<Menu> getMenuById(int Typeid, int CategoryId) { DALServiceGateway<IEnumerable<Menu>> gate = new DALServiceGateway<IEnumerable<Menu>>(); var menus = gate.GetItems("api/Menu?Typeid="+Typeid+"&CategoryId="+CategoryId+""); return menus; }
// GET: api/Food?CategoryId=2 public IEnumerable<Food> getMenuById(int CategaryId) { DALServiceGateway<IEnumerable<Food>> gate = new DALServiceGateway<IEnumerable<Food>>(); var food = gate.GetItems("api/Food?CategoryId=" + CategaryId + ""); return food; }