Class E181_DeleteSingle_ef
EF Core twin of : create an employee, load it, delete it, load it again.
The delete removes the header row in objects; the Props row and every nested row go with it
because the flat schema declares ON DELETE CASCADE, as redb does for its own rows. Without that in the
schema, an EF application has to configure the cascade itself (OnDelete(DeleteBehavior.Cascade))
or load and remove the whole graph.
[ExampleMeta("E181_ef", "EF: Delete - Single Object", "CRUD", ExampleTier.Free, 181, new string[] { "EF", "Delete" })]
public class E181_DeleteSingle_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)