The main objectives of the article are:
- .NET API And Angular Application Communication.
- Install SQL Server And SQL Management Studio.
- Create SQL Database Table
.NET API And Angular Application Communication:
- User request the angular application(Single Page Application) then js files are downloaded and then runs the browser.
- Since Angular is a single-page application, it depends on API for data to display.
- API runs at the server that gives JSON response. API communicates with the database for fetching the data.
Install SQL Server And SQL Management Studio:
First, install SQL serve in our local machine. So go to line 'https://www.microsoft.com/en-in/sql-server/sql-server-downloads' and then install the developer version which is free and fully functional.
Next, install the SSMS(SQL Server Management Studio) IDE at 'https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms'
Create A Database:
A Database contains a collection of tabes that maintains the data. So let's create a Database in our SQL.
Open SSMS and connect with the local server either '(local)\sqlexpress' or '.\sqlexpress' and then right-click on 'Databases' and select 'New Database' and then name your database and create.
Student Table SQL Script:
Let's create a sample 'Student' table in our database.
CREATE TABLE [dbo].[Student]( [Id] [int] IDENTITY(1,1) NOT NULL, [Name] [varchar](500) NULL, [Age] [int] NULL, [Gender] [varchar](10) NULL, CONSTRAINT [PK_Student] PRIMARY KEY CLUSTERED ( [Id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO
- Here small student table with columns like 'Id', 'Name', 'Age', 'Gender'.
Support Me!
Buy Me A Coffee
PayPal Me
Video Session:
Wrapping Up:
Hopefully, I think this article delivered some useful demo on .NET6 API and Angular application. using I love to have your feedback, suggestions, and better techniques in the comment section below.
Refer:
Part-2 A CRUD Operation Demo With .NET6 Web API | SQL Database | Angular13
Part-3 A CRUD Operation Demo With .NET6 Web API | SQL Database | Angular13
Part-3 A CRUD Operation Demo With .NET6 Web API | SQL Database | Angular13
Comments
Post a Comment