BeginTransaction in EF
i want use Transaction in EF. But I do not know anything about it.

please convert this ADO code to EF:

    using System.Data.SqlClient;
    private void button4_Click(object sender, EventArgs e)
        {
            string strConnection = @"Data Source = ARASH-PC\ARASH; Initial Catalog = SampleDB; User Id = sa; Password = 1;";
            SqlConnection con = new SqlConnection(strConnection);
            con.Open();
            SqlCommand command1 = new SqlCommand("INSERT " + " INTO Acc_Group (SalMali,Code_Group,Name_Group)" + " VALUES(84,60,N'aaaa')", con);
            SqlCommand command2 = new SqlCommand("INSERT " + " INTO Acc_Group (SalMali,Code_Group,Name_Group)" + " VALUES(84,80,N'ssss')", con);
             
            SqlTransaction Transaction = con.BeginTransaction();
            command1.Transaction = Transaction;
            command2.Transaction = Transaction;
            command1.ExecuteNonQuery();
            command2.ExecuteNonQuery();
            Transaction.Save("This Point");
            Transaction.Rollback("This Point");
            Transaction.Commit();
            command1.Dispose();
            command2.Dispose();
            con.Close();
 
        }



thx 
BeginTransaction in EF
===

i want use Transaction in EF. But I do not know anything about it.

please convert this ADO code to EF:

    using System.Data.SqlClient;
    private void button4_Click(object sender, EventArgs e)
        {
            string strConnection = @"Data Source = ARASH-PC\ARASH; Initial Catalog = SampleDB; User Id = sa; Password = 1;";
            SqlConnection con = new SqlConnection(strConnection);
            con.Open();
            SqlCommand command1 = new SqlCommand("INSERT " + " INTO Acc_Group (SalMali,Code_Group,Name_Group)" + " VALUES(84,60,N'aaaa')", con);
            SqlCommand command2 = new SqlCommand("INSERT " + " INTO Acc_Group (SalMali,Code_Group,Name_Group)" + " VALUES(84,80,N'ssss')", con);
             
            SqlTransaction Transaction = con.BeginTransaction();
            command1.Transaction = Transaction;
            command2.Transaction = Transaction;
            command1.ExecuteNonQuery();
            command2.ExecuteNonQuery();
            Transaction.Save("This Point");
            Transaction.Rollback("This Point");
            Transaction.Commit();
            command1.Dispose();
            command2.Dispose();
            con.Close();
 
        }



thx 