Hey guys this articles that i am writing is an unofficial articles. If you are not executing then i am not resposible. You have to wait until i make a perfect tutorial on My Xamarin Guy Show.
At first we are going to create a simple web api project.
We are going to join three tables with guid’s and create an API.
We will be using Employee,Department&Block classes and Employee class will be our master table class from where we are going to handle department and block.
Step1: Lets create models Folder. Which contain class: Department,Employee,Block,EmployeeContext,MyWish
Inside Startup.cs Class configure your database
Inside package manager console:
Now we are going to create different controllers : BlockController.cs,DepartmentController.cs,EmployeesController.cs inside controller class so you have to create 3 api controller classes:
Last Step is to use magic of postman:
Your localhost : http://localhost:50442/api/employees
That’s all add block and department inside the table:
For Depatment Post:
For Block Post:
At last Do crud operation for master employee table adding the guids of of Block and Department for employee.
Your Put method will looklikethis:
767 total views, 1 views today