davidikin45
davidikin45
``` services.Configure(options => { options.JsonSerializerOptions.PropertyNamingPolicy = JsonNamingPolicy.CamelCase; options.JsonSerializerOptions.DictionaryKeyPolicy = JsonNamingPolicy.CamelCase; }); { "errors": { "Email": [ "The Email field is not a valid e-mail address." ] }, "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1", "title":...
Wasn't the whole point of https://github.com/dotnet/runtime/issues/29690 to allow WebAPI to accept untyped json payloads and access them easily. e.g model.Property1? Seems strange you would regress this functionality previously provided by...
Create implementations of `IDesignTimeDbContextFactory and IDesignTimeDbContextFactory Replace typeof(Startup).GetTypeInfo().Assembly.GetName().Name with migration assembly name ``` public class ConfigurationContextDesignTimeFactory : DesignTimeDbContextFactoryBase { public ConfigurationContextDesignTimeFactory() : base("IDPDataDBConnectionString", typeof(Startup).GetTypeInfo().Assembly.GetName().Name) { } protected override ConfigurationDbContext CreateNewInstance(DbContextOptions...
``` public static IWebHostBuilder CreateWebHostBuilder(string[] args) => WebHost.CreateDefaultBuilder(args) .UseSetting("detailedErrors", "true") .CaptureStartupErrors(true) .UseKestrel(options => { options.AddServerHeader = false; } ) .UseAutofac() .UseConfiguration(Configuration) .UseSerilog() .UseStartup(); var host = CreateWebHostBuilder(args).Build(); //Db initialization using...
For the time being will use services.GetService instead and check for null but would be nice to have a flag
@davidfowl I do that for unhandled exceptions while the host is running but I like the idea of displaying the error page for startup configuration exceptions
Use it to avoid EF Code
For anyone targeting .Net Framework 4.7.1 or 4.7.2 this worked for me previous?.Invoke(context); var assembly = typeof(Startup).GetTypeInfo().Assembly; var assemblies = assembly.GetReferencedAssemblies().Select(x => MetadataReference.CreateFromFile(Assembly.Load(x).Location)) .ToList(); string netVersion = "v4.7.2"; assemblies.Add(MetadataReference.CreateFromFile(Assembly.Load(new AssemblyName("Microsoft.AspNetCore.Html.Abstractions")).Location));...