Exemple #1
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            // Add framework services.
            var dataContextBuilder = new DataContextBuilder();

            //add supplimental content packages here
            services.AddBlogs(dataContextBuilder);
            services.AddQuotes(dataContextBuilder);
            services.AddPages(dataContextBuilder);

            services.AddInstance(dataContextBuilder);
            services.AddHermesDataContext(Configuration.GetSection("DataAccess"));

            services.AddMvc().AddJsonOptions(options =>
            {
                options.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver();
                options.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;
            });
        }