Welcome to Xamarin Guy Show Blog

Keep updated for latest and Greatest Posts from Xamarin guy

Asp.net core Web API join two tables [Sampurna]#3

Create a model folder(Models)
Inside Models folder
Create a Department class Department.cs

Step2 :
Create a Employee.cs class with in folder

Step 3:
Create a employee context class inside models folder EmployeeContext

//This class will be called inside controller i.e employee controller for our post and put method.
Step4 : Create another class NewCollector

Inside our Startup.cs class

Step6 : Inside our package manager console
Add-migration Initial

Create a controllers class replace with this :

Run the application
Use this For GEt : http://localhost:49465/api/employees
Use this for POST : http://localhost:49465/api/employees
and select body >> raw >> json (Application/json)>>
and add this

Use this for put method :

Use this for delete : http://localhost:49465/api/employees/8
That’s all thank’s keep supporting. 😀

 3,392 total views,  6 views today

Leave a Reply