daha kolayı var aşağıda

string RootListNo = SQLCalistir_S("INSERT INTO RootList (Baslik,Aciklama,Root,KullaniciNo) OUTPUT INSERTED.No VALUES ('" + d.Name + "' ,''," + rootNo.ToString() + ",2 )");

public string SQLCalistir_S(string cumle, SqlParameterCollection coll)
{
using (SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrin gs["ConnStr"].ConnectionString))
{
using (SqlCommand comm = new SqlCommand(cumle, conn))
{
try
{
conn.Open();
foreach (SqlParameter p in coll)
{
SqlParameter pp = new SqlParameter(p.ParameterName, p.SqlDbType);
p.IsNullable = true;
pp.Value = (p.Value == null ? DBNull.Value : p.Value);
comm.Parameters.Add(pp);
}
return comm.ExecuteScalar().ToString();
}
catch (Exception)
{
return "-";
}
}
}
}