Posts

Showing posts from March, 2018

CRUD operations using ASP.NET Web API With Entity Framework In ASP.NET MVC

Image
Step 1 Create a table, for example, see below with snapshot. Step 2 ->Open Visual studio and take a new project. ->Choose ASP.NET Web Application and give name Ex.CRUDWebApiExam and click ok . We have to create first Web API, so we choose Web API option and click OK. Step 3 Now we have to add class so for this, we right click of web api project and add ADO.NET Entity Data Model, Add EF Designer from database and click Next button. Add click new connection option and give the server name and select database and click Test Connection and click ok. Click Next and select the table which you want and click ok. Click Finish. Step 4 Now we have to add Wep Api controller, So right click on controllers folder, Select 'Web Api Controller with views, using Entity framework'. Click Add. Select the Model Class Name Exam. Customer(In my project). Select Data context class, Exam. SystemTestEntity (In my project). Give Controller N...