Exemple #1
0
        public Startup(IHostingEnvironment hostingEnv)
        {
            this.env = hostingEnv;
            //convert Enums to Strings (instead of Integer) globally
            JsonConvert.DefaultSettings = (() => {
                var settings = new JsonSerializerSettings();
                settings.Converters.Add(new StringEnumConverter {
                    CamelCaseText = true
                });
                return(settings);
            });

            bootstrapper = new DefaultApplicationBootStrapper();
            bootstrapper.AddInstaller(new WebApiInstaller());
        }