Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
0
 public void Sil(Etkilesim veri)
 {
     _etkilesimDal.Sil(veri);
 }
Ejemplo n.º 4
0
 public void Ekle(Etkilesim veri)
 {
     _etkilesimDal.Ekle(veri);
 }