i am moving a Code first EF project to a DB first project, cause we need to add our project to an existing DB and use some of the existing tables.
when i run the CodeFirst project it returns the correct JSON:
, but when i do the same on the DB first project it only returns the first object, and returns $refs for all the other objects.
You will need to make use of DTO's to transfer your data from your web api to the client application.
Those references are proxies for entity framework, to lazyload these but they don't get serialized in json.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.