TechieClues TechieClues
Updated date May 03, 2023
In this article, We will learn how to create a simple windows application (CRUD operations) using C# and will create a windows form and controls, database, and tables.


A CRUD application is a type of software that allows users to create, read, update, and delete data in a database. CRUD applications are used in a variety of industries and are essential for managing large amounts of data.

In this article, we'll be building a simple CRUD application in C# using Windows Forms. We'll be using Visual Studio, which is a popular integrated development environment (IDE) for Windows applications.

Step 1:

To get started, open Visual Studio and create a new Windows Forms project. To do this, go to File > New > Project.

Step 2:

In the New Project dialog, Select Visual C# templates > Choose .Net Framework > Select "Windows Forms App (.Net Framework)". Give your project a name and choose a location to save it. Then click "Create".

Step 3:

Once the application is created successfully, We will start adding controls from the Toolbox section as shown below and provide proper naming for controls.

Step 4:

Next, We will create a database and table in SQL Server. Open "Microsoft SQL Server Management Studio" > Right Click "Database" folder > Click "New Database".

In the below "New Database" dialog, provide a new database name as "dbEmployeeDetails" and click OK.

Step 5:

Run the below new table creation query in the SQL window to create a new Emp_details table.

CREATE TABLE [dbo].[Emp_details](
	[EmpId] [int] NOT NULL,
	[EmpName] [nvarchar](50) NULL,
	[EmpAge] [int] NULL,
	[EmpContact] [int] NULL,
	[EmpGender] [nchar](10) NULL

You can also verify table columns by Right Click the newly created table and clicking "Design". The table looks like below in SQL studio,

Next article, We will see how to create a database connection from a Windows application to a database and CRUD Operation (Create, Retrieve, Update, and Delete).

CRUD Operations In Windows Application Using C# - Part 2



We will post the articles, blogs or interview questions and answers in Python, PHP, Java, C#.Net, ASP.Net MVC, ASP.NET WEB API, Webservices, VB.NET, .Net Core, ...Read More

Comments (0)

There are no comments. Be the first to comment!!!