Skip to content

Instantly share code, notes, and snippets.

@Pierry
Created May 26, 2014 11:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pierry/b5eea368e9452e69279a to your computer and use it in GitHub Desktop.
Save Pierry/b5eea368e9452e69279a to your computer and use it in GitHub Desktop.
public DomainContext() : base(""){
Configuration.LazyLoadingEnable = false;
Configuration.ProxyCreationEnable = false;
}
public static void Register(HttpConfiguration config){
// Web API configuration and services
var formatters = GlobalConfiguration.Configuration.Formatters;
var jsonFormatter = formatters.JsonFormatter;
jsonFormatter.SerializerSettings.PreserveReferencesHandling = Newtonsoft.Json.PreserveReferencesHandling.None;
config.Formatters.Remove(config.Formatters.XmlFormatter);
cofnfig.Formatters.JsonF
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment