public async Task Can_have_non_string_property_named_Discriminator() { using var context = new NonStringDiscriminatorContext(Fixture.CreateOptions()); context.Database.EnsureCreated(); context.Add(new NonStringDiscriminator { Id = 1 }); await context.SaveChangesAsync(); Assert.NotNull(await context.Set <NonStringDiscriminator>().FirstOrDefaultAsync()); }
public async Task Can_have_non_string_property_named_Discriminator() { await using var testDatabase = CosmosTestStore.CreateInitialized(DatabaseName); using (var context = new NonStringDiscriminatorContext(Fixture.CreateOptions(testDatabase))) { context.Database.EnsureCreated(); context.Add(new NonStringDiscriminator { Id = 1 }); await context.SaveChangesAsync(); Assert.NotNull(await context.Set <NonStringDiscriminator>().FirstOrDefaultAsync()); } }