TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Nguyen Anh
NA
116
526
How to view related data from API in WebApp.
Jan 19 2021 10:45 AM
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
},
Reply
Answers (
4
)
How to handle multiple client with one project ?
Working with CPU rate limits with C#