Dear all.
I have create a solution in which I have
- API project.
- WebApp project.
In API projet I have a 3 model
People
{
PeopleID
PeopleName
}
Car
{
CarID
PeopleID //Who own the car.
}
CarDriver
{
CarID
PeopleID //Who drive the car.
}
I have create API to receive the data and it related from Database.
The data is seem to be like that (more complicated than demo model above.
And How can I view it in the razor page in webapp please.
{
"carID": 15,
"peopleID": 1,
"pidInfor": {
"peopleID": 1,
"peopleName": "Lê Van Dung",
"peopleFrom": "Nghia Huong, Qu?c Oai, Hà N?i",
"peopleGende": "Nam",
"peopleDateOfBirth": "1983-08-13T00:00:00",
"peopleAddress": "Xóm 10, Van Quang, Nghia Huong, Qu?c Oai, Hà N?i",
"peoplePIDNumber": "001083011872",
"peoplePIDDate": "2015-02-11T00:00:00",
"peoplePIDPlace": "C?c c?nh sát ÐKQL Cu Trú và DLQG v? dân cu",
"peoplePIDValidUntil": "2030-02-11T00:00:00",
"joinDate": null,
"peopleImagePath": null,
"driverLicence": null,
"contacts": null,
"carOwner": [
{
"carID": 15,
"carModelID": 1,
"carEngieNumber": "1NZ-Y545573",
"carEngieChassisNumber": "RL4BT923C9518900",
"carManufactureYear": "2012",
"carManufactureCountry": "Vi?t Nam",
"locationCompanyID": null,
"locationUser": null,
"locationPass": null,
"locationValidUntil": null,
"peopleID": 1,
"carPlate": "29A-532.95",
"inspectionValidUntil": null,
"insuranceValidUntil": null,
"carOwnerNote": null,
"carRegistrations": null,
"lCompany": null,
"carInsurances": null,
"carInspections": null,
"carModel": null
}
],
"carRegistrations": null,
"pidImages": null,
"driverLicenceImages": null
},
"carInfor": {
"carID": 15,
"carModelID": 1,
"carEngieNumber": "1NZ-Y545573",
"carEngieChassisNumber": "RL4BT923C9518900",
"carManufactureYear": "2012",
"carManufactureCountry": "Vi?t Nam",
"locationCompanyID": null,
"locationUser": null,
"locationPass": null,
"locationValidUntil": null,
"peopleID": 1,
"pidInfor": {
"peopleID": 1,
"peopleName": "Lê Van Dung",
"peopleFrom": "Nghia Huong, Qu?c Oai, Hà N?i",
"peopleGende": "Nam",
"peopleDateOfBirth": "1983-08-13T00:00:00",
"peopleAddress": "Xóm 10, Van Quang, Nghia Huong, Qu?c Oai, Hà N?i",
"peoplePIDNumber": "001083011872",
"peoplePIDDate": "2015-02-11T00:00:00",
"peoplePIDPlace": "C?c c?nh sát ÐKQL Cu Trú và DLQG v? dân cu",
"peoplePIDValidUntil": "2030-02-11T00:00:00",
"joinDate": null,
"peopleImagePath": null,
"driverLicence": null,
"contacts": null,
"carOwner": [],
"carRegistrations": null,
"pidImages": null,
"driverLicenceImages": null
},
"carPlate": "29A-532.95",
"inspectionValidUntil": null,
"insuranceValidUntil": null,
"carOwnerNote": null,
"carRegistrations": null,
"lCompany": null,
"carInsurances": null,
"carInspections": null,
"carModel": null
},
"driverNote": null
},
Rijwan AnsariPosted Jan 21, 2021, 6:29 PM
Nguyen AnhPosted Jan 21, 2021, 1:11 AM
- One for API in this i create the model.
- One for webapp in which I consume API.
And now I one to view the model i have created in API in webapp.
Asma KhalidPosted Jan 19, 2021, 1:48 PM
Sachin SinghPosted Jan 19, 2021, 12:39 PM