public JsonResult Insert(Wine wine) { Response.AppendHeader("Access-Control-Allow-Origin", "*"); WineDa da = new WineDa(); Wine result = da.Insert(wine); return(Json(result)); }
public void InsertWine() { Wine wine = new Wine(); wine.name = "unit test wine"; wine.grapes = "23"; wine.country = "Bolivia"; wine.region = "Sucre"; wine.year = "2013"; wine.description = "No description"; wine.picture = "wine1.png"; WineDa da = new WineDa(); Wine result = da.Insert(wine); Assert.IsTrue(result != null); }