using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Configuration; using System.Data.SqlClient; namespace ADO_MVC { public class ADOMVC { public int Insert(string query) { SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["con_String"].ToString()); conn.Open(); SqlCommand cmd = new SqlCommand(); cmd.Connection = conn; cmd.CommandText = query; int res = cmd.ExecuteNonQuery(); conn.Close(); return res; } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)