Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Web Api Curd Operation and Consume It In MVC Project

✓ Database (MS SQL Server)

Now Make Store Procedure For Insert Update Delete And GetAll
**************************************************************

✓ Create a Web Api Project in Visual Studio

Models:- Create All Database properties in model class


Models:- Add another class in model for database logic.(DAL)
Controller: - Add a controller
***************************************************************

✓ Add MVC Project in Visual Studio Where Above


- Web Api Consumed

Note:- When Run MVC Project Then Web Api run Along with MVC Project for doing this

Go to solution Explorer--> All Project Properties eg.(2 of 2 Projects)-->

Models:- Add a class Where properties define same as web Api Properties
Controller: - Add a MVC controller
NOTE:- Now Create The View For All ADD, EDIT, SHOW ALL DATA ETC

You might also like