Introduction
This article will explain, how to create counter count of skills dynamically in ASP.Net MVC.
This article requires the following basic understanding
- Bootstrap 4
- CSS3
- JQuery
- MVC
- Entity Framework
- View Model
- SQL Server
Step-1 Open your favorite SQL server database, any version. It doesn’t really matter. Create tables’ frontend technology and backend technology.
- CREATE TABLE [dbo].[FrontendTechnology](
- [Id] [int] IDENTITY(1,1) NOT NULL,
- [ProgrammingLanguage] [nvarchar](50) NULL,
- [Percentage] [int] NULL,
- CONSTRAINT [PK_FrontendTechnology] 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
- CREATE TABLE [dbo].[BackendTechnology](
- [Id] [int] IDENTITY(1,1) NOT NULL,
- [ProgrammingLanguage] [nvarchar](50) NULL,
- [Percentage] [int] NULL,
- CONSTRAINT [PK_BackendTechnology] 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

Step-3 Create an empty project in visual studio and give an appropriate name. Check MVC checkbox and click on OK.
Step-4 Right-click on the Models folder and add a database model. Add Entity Framework now. For that, right-click on Models folder, select Add, then select New Item.
You will get a window; from there, select Data from the left panel and choose ADO.NET Entity Data Model, give it the name SkillModel (this name is not mandatory, you can give any name) and click "Add"
After you click on "Add a window", the wizard will open. Choose EF Designer, from the database, and click "Next".
After clicking on "Next", a window will appear. Choose New Connection. Another window will appear. Add your server name. If it is local, then enter a dot (.). Choose your database and click "OK".
The connection will be added. If you wish, save the connection name, as you want. You can change the name of your connection below. It will save the connection in the web config. Now, click "Next".
After clicking on NEXT, another window will appear. Choose the database table name, as shown, in the below screenshot and click "Finish".
Entity Framework gets added and the respective class gets generated under the Models folder.
Step 5 Right-click on Controllers folder and add a controller.
A window will appear. Choose MVC5 Controller-Empty and click "Add".
After clicking on "Add", another window will appear with DefaultController. Change the name to HomeController and click "Add". The HomeController will be added under the Controllers folder. Don’t change the Controller suffix for all controllers, change only the highlight, and instead of Default, just change Home.
Step-6 Right click on project “Add Folder” and name it ViewModel. Now, right click on this folder and “Add Class”, with name SkillViewModel, and write following code.

Sourav Kumar DasPosted Oct 13, 2019, 11:30 PM
Superb Article Sir.