public void AddFeedback(feedbackPackerModel cs) { // var query = "insert into * feedback"; SqlCommand com = new SqlCommand("f_Cus_Add", con); com.CommandType = CommandType.StoredProcedure; com.Parameters.AddWithValue("@feedbackPacker", cs.feedbackPacker); con.Open(); com.ExecuteNonQuery(); con.Close(); }
public string Post([FromBody] feedbackPackerModel cs) { db dblyer = new db(); try { dblyer.AddFeedback(cs); return("Success"); } catch (Exception) { return("Something went wrong"); } }