public void InsertCrave(CraveModel crave) { SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@USERID", crave.UserId), new SqlParameter("@SHORTCOMMENT", crave.CravingTextShort), new SqlParameter("@IMAGEURL", crave.CravingPic), new SqlParameter("@COMMENT", crave.CravingTextLong), new SqlParameter("@LOCATION", crave.Location), new SqlParameter("@TYPE", crave.Type) }; ExecuteSPNonReturnData("InsertUserPost", parameters); }
public void InsertCrave(CraveModel crave) { crave.CravingTextLong = GetGeoLocation(crave.Location); new CraveDAL().InsertCrave(crave); }
// POST: api/Crave public void Post(CraveModel crave) { new CraveModel().InsertCrave(crave); }