Introduction
In this article we are going to discuss about how to develop .NET7.0 based web api with CRUD operations on MSSQL server. To develop this sample application i'm using Visual Studio 2022, SQLExpress server, Microsoft SQL Server Management Studio.
Create sample database and table in SQL server
Create a database
Execute the following commands in SQL editor
create datbase DATABASE-NAME
Use a database
use DATABASE-NAME
Create a sample table
Create any sample table under the database created in the previous step
-- create a table Companies with name, id, address, email, and phone number
CREATE TABLE Companies (
id int,
name varchar(50),
address text,
email varchar(50),
phone varchar(10)
);
Post a Comment
Post a Comment