/*********************************************************** INSERT METHODS *******************************************************/ //create an artist by passing artist model to datacontroller public ActionResult Createartist(ArtistModel newartist) { int artistID; ArtistDataController dataController = new ArtistDataController(); dataController.InsertArtist(newartist); artistID = dataController.GetArtistID(newartist); return(Content(artistID.ToString())); }
/************************************************************ GET METHODS ********************************************************/ public ActionResult GetArtist(ArtistModel model) { int artistID; ArtistDataController dataController = new ArtistDataController(); artistID = dataController.GetArtistID(model); System.Web.HttpContext.Current.Session["Artist"] = artistID; return(Content(artistID.ToString())); }