Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cosmos: Remove the API to map owned entity types to separate documents #14045

Merged
merged 1 commit into from
Nov 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 0 additions & 53 deletions src/EFCore.Cosmos/CosmosCollectionOwnershipBuilderExtensions.cs

This file was deleted.

53 changes: 0 additions & 53 deletions src/EFCore.Cosmos/CosmosReferenceOwnershipBuilderExtensions.cs

This file was deleted.

60 changes: 9 additions & 51 deletions test/EFCore.Cosmos.FunctionalTests/NestedDocumentsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,10 @@ public NestedDocumentsTest(ITestOutputHelper testOutputHelper)
}

// #13579
// [Theory]
[InlineData(true)]
[InlineData(false)]
public virtual void Can_update_dependents(bool useNesting)
// [Fact]
public virtual void Can_update_dependents()
{
using (CreateTestStore(modelBuilder =>
{
OnModelCreating(modelBuilder);

if (!useNesting)
{
RemoveNesting(modelBuilder);
}
}))
using (CreateTestStore(OnModelCreating))
{
Operator firstOperator;
Engine firstEngine;
Expand All @@ -63,20 +53,10 @@ public virtual void Can_update_dependents(bool useNesting)
}
}

[Theory]
[InlineData(true)]
[InlineData(false)]
public virtual void Can_update_owner_with_dependents(bool useNesting)
[Fact]
public virtual void Can_update_owner_with_dependents()
{
using (CreateTestStore(modelBuilder =>
{
OnModelCreating(modelBuilder);

if (!useNesting)
{
RemoveNesting(modelBuilder);
}
}))
using (CreateTestStore(OnModelCreating))
{
Operator firstOperator;
Engine firstEngine;
Expand Down Expand Up @@ -151,20 +131,10 @@ public virtual void Can_add_collection_dependent_to_owner()
}

// #13559
//[Theory]
[InlineData(true)]
[InlineData(false)]
public virtual void Can_update_just_dependents(bool useNesting)
//[Fact]
public virtual void Can_update_just_dependents()
{
using (CreateTestStore(modelBuilder =>
{
OnModelCreating(modelBuilder);

if (!useNesting)
{
RemoveNesting(modelBuilder);
}
}))
using (CreateTestStore(OnModelCreating))
{
Operator firstOperator;
Engine firstEngine;
Expand Down Expand Up @@ -432,18 +402,6 @@ protected virtual void OnModelCreating(ModelBuilder modelBuilder)
eb => eb.OwnsMany(v => v.Addresses).HasKey(v => new { v.Street, v.City }));
}

private static void RemoveNesting(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Vehicle>(
eb => eb.OwnsOne(v => v.Operator).ToContainer(nameof(TransportationContext)));

modelBuilder.Entity<CombustionEngine>(
eb => eb.OwnsOne(v => v.FuelTank).ToContainer(nameof(TransportationContext)));

modelBuilder.Entity<PoweredVehicle>(
eb => eb.OwnsOne(v => v.Engine).ToContainer(nameof(TransportationContext)));
}

protected TestStore CreateTestStore(Action<ModelBuilder> onModelCreating)
{
TestStore = TestStoreFactory.Create(DatabaseName);
Expand Down