Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with serialization in web api restful service
Message
 
 
To
17/06/2016 06:52:31
John Baird
Coatesville, Pennsylvania, United States
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01637433
Message ID:
01637454
Views:
55
>I removed the reference to ProfileSettings from measurement and now it works fine. However, that raises another question. How can I know set the FK releationship between the 2 files, if I can't specify the relationsship?

This is how our models are set up in terms of foreign keys (all our models are auto-generated by the Reverse POCO generator):
 // Foreign keys
        public virtual ExportJobs ExportJobs { get; set; } // FK_ExportJobs_AccountingExportJobs_ExportJobsId
Also, we have separated the models in its separate project and the web project uses view models and not models directly. In the view models you don't have to use foreign keys.

In your case you seems to be missing 'virtual' keyword. See if adding it will make a difference.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform