I created a blog website using MVC patter but now i want to add a view count to the blogs using Database , how should i do
Loading
I created a blog website using MVC patter but now i want to add a view count to the blogs using Database , how should i do
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh KumarPosted Dec 4, 2023, 7:08 AM
Hello Abhisek,
Please use below one,
Model :
Youe Database connection here I have taken Entity framework DBContext
Your MVC Controller,
MVC View :