public ActionResult <List <Menu> > GetKaiba() // returns a list of the menus { // create DbAccessManagement object DbAccessManagement DAM = new DbAccessManagement(); // return the list of menus return(DAM.getMenus()); // This is all test code /* * Menu testMenu = new Menu(1, "NEW_MENU", "DESCRIPTIONDFSJGH", 30000); * DAM.InsertMenu(testMenu); * DAM.DeleteMenu(3); * * Section testSection = new Section(1, "SECTION_TEST", "MY_LOVELY_SECTION_DESCRIPT", 30000, "NO_PICS", 1); * DAM.InsertSection(testSection); * DAM.DeleteSection(5); * * Item testItem = new Item(1, "ITEM_NAME", "ITEM_DESC", 20000, "LOVELY_PICTURE_OF_SOUP", 1); * DAM.InsertItem(testItem); * DAM.DeleteSection(9); * * Priceline testPrice = new Priceline(1, "68 Orders", (decimal) 100.99, 10000, 1); * DAM.InsertPriceline(testPrice); * DAM.DeletePriceline(11); * * * return DAM.GetSectionsInMenu(1); */ }
public ActionResult <List <Menu> > GetMenus() // returns a list of the menus { // create DbAccessManagement object DbAccessManagement DAM = new DbAccessManagement(); // return the list of menus System.Diagnostics.Debug.WriteLine("MenuCont: GetMenus() "); return(DAM.getMenus()); }
public ActionResult <List <Menu> > Get() { DbAccessManagement DAM = new DbAccessManagement(); return(DAM.getMenus()); //return new string[] { DbAccessManagement.DBTest2() }; /* * if(DbAccessManagement.DBTest()) * { * return new string[] {"connected"}; * } * else * { * return new string[] { "failed" }; * } */ //return new string[] { "value1", "value2" }; }