Introduction
In this blog we will see how to use transactions in entity framework.
Step 1: Create asp.net web application

Webform1.aspx
- <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="EF_Transcation_Support.WebForm1" %>
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head runat="server">
- <title></title>
- </head>
- <body>
- <form id="form1" runat="server">
- <div>
- <table>
- <tr>
- <td>
- <asp:Label ID="Label1" runat="server" Text="EF Transaction" Font-Bold="true"></asp:Label>
- </td>
- </tr>
- </table>
- <br />
- <br />
- <table>
- <tr>
- <td colspan="2">
- <asp:Button ID="Button1" runat="server" Text="Insert Data"
- BackColor="Orange" Font-Bold="true" OnClick="Button1_Click" />
- <br />
- <br />
- </td>
- </tr>
- </table>
- </div>
- </form>
- </body>
- </html>


Join the conversation! Your thoughts help the community grow.