public void UpdateExhibit([FromBody] Exhibit exhibit) { //create the exhibit manager ExhibitDBManager exhibitDBManager = new ExhibitDBManager(); //insert exhibit into database exhibitDBManager.Update(exhibit); }
public void DeleteExhibit([FromBody] Exhibit exhibitData) { //create the exhibit manager ExhibitDBManager exhibitDBManager = new ExhibitDBManager(); int exhibitID = exhibitData.getId(); //update exhibit and add it to the database exhibitDBManager.Delete(exhibitID); }
public string GetAllExhibits() { //get list of exhibits ExhibitDBManager exhibitDBManager = new ExhibitDBManager(); List <Exhibit> exhibitsArr = exhibitDBManager.getExhibits(); //IEnumerable<Exhibit> temp = exhibitsArr; // string json = Newtonsoft.Json.JsonConvert.SerializeObject(temp); string jsonExhibitsArr = Newtonsoft.Json.JsonConvert.SerializeObject(exhibitsArr); return(jsonExhibitsArr); }