public override void Sil(Etkilesim veri) { string commandText = "delete from Etkilesimler where EtkilesimId = @id"; SqlConnection _sqlConnection = new SqlConnection(yol); if (_sqlConnection.State == ConnectionState.Closed) { _sqlConnection.Open(); } SqlCommand _sqlCommand = new SqlCommand(commandText, _sqlConnection); _sqlCommand.Parameters.AddWithValue("@id", veri.EtkilesimId); _sqlCommand.ExecuteNonQuery(); _sqlConnection.Close(); }
public override void Ekle(Etkilesim veri) { string commandText = "insert Etkilesimler values(@PaylasimId)"; SqlConnection _sqlConnection = new SqlConnection(yol); if (_sqlConnection.State == ConnectionState.Closed) { _sqlConnection.Open(); } SqlCommand _sqlCommand = new SqlCommand(commandText, _sqlConnection); _sqlCommand.Parameters.AddWithValue("@PaylasimId", veri.PaylasimId); _sqlCommand.ExecuteNonQuery(); _sqlConnection.Close(); }
public void Sil(Etkilesim veri) { _etkilesimDal.Sil(veri); }
public void Ekle(Etkilesim veri) { _etkilesimDal.Ekle(veri); }