Hello everyone I'm new in .net core . Please let me know how to make a (curd operation) web api in .net core with Entity fram work with code first approach . One more question how call web api in react. Because I have try react in front end.
Loading
Hello everyone I'm new in .net core . Please let me know how to make a (curd operation) web api in .net core with Entity fram work with code first approach . One more question how call web api in react. Because I have try react in front end.
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.
Sardar Mudassar Ali KhanPosted Dec 2, 2021, 10:59 AM
In this article, I will discuss the complete procedure of crud operation in Asp.Net Core 5 Web API project. We will send the complete JSON object to the POST endpoint and then we will update the data in the database using PUT Endpoint. Basically, in this project we will perform the complete CRUD operation using Asp.Net 5 Architecture. We will perform the following operation like POST PUT DELETE GET operations. POST Method is used for sending the JSON Data to database PUT Method is used to update the Data in Database DELETE Method is used to delete the data from the database either based on Id OR Compete Data from Database GET Method is used for Getting all the record from the database either on the bases of Id or All Data in the form of JSON objects. I will apply the repository pattern in this project CRUDAspNetCore5Web API
Resources can be downloaded from Article Resource Section.
https://www.c-sharpcorner.com/article/crud-operation-in-asp-net-core-5-web-api/
Satya KarkiPosted Dec 2, 2021, 5:52 AM
Vikas PanwarPosted Dec 1, 2021, 12:40 PM
geetha geethaPosted Dec 1, 2021, 4:02 AM
Perform crud operation in .Net Core:
Here I implemented Employee Management application using .NET core MVC as a frontend, SQL server as a backend. In this application user needs to create a new employee record, edit the record also delete operations also be performed.
First, you need to create a database for Employee.
The database table contains a column like, employee id, employee name, email, age, salary.
In Microsoft Visual studio, have to create a new. Net core project, after creating the project add new model class for our project.
Connect your database using App setting connecting string.
before that , you have to enable migration and update teh data base.
After that create a controller class for our application, in this class you have to add view like create view, edit view, delete view.
Outputs:
Index page:
Create:
Update:
Delete:
Jignesh KumarPosted Dec 1, 2021, 3:39 AM