public static FslFrameworkOptions AddBlazorFslFramework(
            this IServiceCollection services,
            IConfiguration configuration)
        {
            services.AddRazorPages();
            services.AddServerSideBlazor();
            services.AddFslFramework(configuration);

            var options = new FslFrameworkOptions(
                services,
                configuration);

            return(options);
        }
Пример #2
0
        public static FslFrameworkOptions AddApiFslFramework(
            this IServiceCollection services,
            IConfiguration configuration)
        {
            services.AddCors();
            services.AddControllers();
            services.AddFslFramework(configuration);

            var options = new FslFrameworkOptions(
                services,
                configuration);

            services
            .AddMvc()
            .SetCompatibilityVersion(CompatibilityVersion.Version_3_0)
            .AddJsonOptions(opt =>
            {
                opt.JsonSerializerOptions.IgnoreNullValues = true;
            });

            return(options);
        }