Quantcast
Channel: EntityFramework Reverse POCO Code First Generator
Viewing all articles
Browse latest Browse all 1642

New Post: From this to WEB API OData for AdventureWorks

$
0
0
Hi, You need to mark the FK's with [JsonIgnore] as you don't want to serialize those links.
    // If you need to serialize your entities with the JsonSerializer from Newtonsoft, this would serialize
    // all properties including the Reverse Navigation and Foreign Keys. The simplest way to exclude them is
    // to use the data annotation [JsonIgnore] on reverse navigation and foreign keys.
    AdditionalReverseNavigationsDataAnnotations = new string[] // Data Annotations for ReverseNavigationProperty.
    {
        "JsonIgnore"
    };  
    AdditionalForeignKeysDataAnnotations = new string[] // Data Annotations for ForeignKeys.
    {
        "JsonIgnore"
    };  

Viewing all articles
Browse latest Browse all 1642


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>