I would like to use BSON in my self-host Web API. I'am using .Net Core 2.0 and autofac. In every each tutorial I see that I need add BsonMediaTypeFormatter to formatters, but I don't have WebApiConfig.cs with HttpConfiguration. In my Web API I have only startup.cs and program.cs.
In startup.cs I have two methods:
public IServiceProvider ConfigureServices(IServiceCollection services)
public void Configure(IApplicationBuilder app, IHostingEnvironment env, IServiceProvider serviceProvider)
How can I set BSON formatter?