Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems with serialization in web api restful service
Message
De
16/06/2016 15:13:51
John Baird
Coatesville, Pennsylvanie, États-Unis
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01637433
Message ID:
01637437
Vues:
56
>>I have the following classes as models:
>>
>>attachment 1 is the profile class. 2 is the Measrements class and 3 is the web api.
>>
>>The return profile object contains a measurement list with 4 objects. When I execute the call to the rest api:
>>
>>localhost/30504/api/Setting/1, I get the following error in attachment 4:
>>
>>When I remove the list object from profile, it works just fine. How do I get this to serialize/deserialize correctly?
>>Thanks in advance for you help... I'm new at this..
>
>Your Measurement class has a reference to ProfileSetting class, so it looks like ProfileSetting has a list of Measurements and Measurement has ProfileSetting, so you're in a circular reference.
>
>Could this be a problem?

Maybe, but i tried to return just a list of meazurements by itself. Same error. That's how you reference foreign keys in ef6, btw.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform