コード例 #1
0
 public bool Sil(int id)
 {
     SqlCommand komut = new SqlCommand(string.Format("{0}_sil", typeof(T).Name), Araclar.Baglanti);
     komut.CommandType = CommandType.StoredProcedure;
     komut.Parameters.AddWithValue("@id", id);
     return Araclar.Calıstır(komut);
 }
コード例 #2
0
 public bool Guncelle(T entity,int id)
 {
     SqlCommand komut = new SqlCommand(string.Format("{0}_Guncelle", typeof(T).Name), Araclar.Baglanti);
     komut.CommandType = CommandType.StoredProcedure;
     foreach (PropertyInfo p in Proplar)
     {
         string adi = p.Name;
         Object deger = p.GetValue(entity);
         komut.Parameters.AddWithValue("@" + adi, deger);
     }
     return Araclar.Calıstır(komut);
 }