Class E076_Distinct_ef
EF Core twin of . redb removes objects whose whole content is the same. In EF the content of an employee is spread over some forty tables; Distinct on an entity query compares the rows of the root table, key included, so it never removes anything. Comparing whole graphs would mean grouping by every column of every table, which no EF query expresses.
[ExampleMeta("E076_ef", "EF: Distinct - Unique by Props", "Query", ExampleTier.Free, 1, new string[] { "EF" })]
public class E076_Distinct_ef : EfExampleBase
Inheritance
Inherited Members
ExampleBase.ExplicitlyRequestedIds,ExampleBase.Fail(string, string, ExampleTier, long, string),ExampleBase.GetMeta(),ExampleBase.Ok(string, string, ExampleTier, long, int, string[], string?),ExampleBase.Ok(string, string, ExampleTier, long, string[], string?),ExampleBase.RunAsync(IRedbService),EfExampleBase.Contexts,EfExampleBase.NotSupported(string, string, ExampleTier, string),EfExampleBase.RunAsync(IRedbService),EfExampleBase.RunEfAsync(IDbContextFactory<FlatContext>)
Methods
RunEfAsync(IDbContextFactory<FlatContext>)
Runs the example through EF Core.
public override Task<ExampleResult> RunEfAsync(IDbContextFactory<FlatContext> contexts)