Category - Entity Framework
Results 11 - 15 of 254
24 Nov 2020 24 Nov 2020 0 Comments  480 Views
Here Mudassar Ahmed Khan has explained with an example, how call (consume) Web API GET method in ASP.Net MVC Razor.

The Web API Action method will be called inside the MVC Controller’s Action method using HttpClient class in ASP.Net MVC Razor.
24 Nov 2020 24 Nov 2020 0 Comments  631 Views
Here Mudassar Ahmed Khan has explained with an example, how to insert data into Database using Web API and Entity Framework in ASP.Net MVC Razor.

When the Add Button is clicked, the InsertCustomer Action method of the Web API is called using jQuery AJAX and the details of Customer are sent as JSON object.

Finally, after insertion the ID of the inserted Customer record is returned back to the View in ASP.Net MVC Razor.
21 Nov 2020 21 Nov 2020 0 Comments  577 Views
Here Mudassar Ahmed Khan has explained with an example, how to do a Database Connection without using Entity Framework in ASP.Net Core Razor Pages.

This article will illustrate how to connect to Database using ADO.Net and fetch data from Database using SqlDataReader in ASP.Net Core Razor Pages.
21 Nov 2020 21 Nov 2020 0 Comments  841 Views
Here Mudassar Ahmed Khan has explained with an example, how to get Auto Increment Primary Key with Entity Framework Database First using C# in ASP.Net MVC Razor.

When the Form is submitted, the value of the submitted Form fields will be fetched using Entity Framework Model class object and will be inserted into database using Entity Framework. After successful insert, the ID of the last inserted record fetched using SCOPE_IDENTITY will be displayed using JavaScript Alert Message Box.
20 Nov 2020 20 Nov 2020 0 Comments  609 Views
Here Mudassar Ahmed Khan has explained with an example, how to call Web API from another Project in ASP.Net MVC Razor.

The Web API 2 Controller’s Action method will fetch records from the SQL Server Database using Entity Framework in ASP.Net MVC Razor.

The Web API 2 Controller’s Action method will be called using WebClient class from another MVC Project using the Web API URL.
Results 11 - 15 of 254