Class E181_DeleteSingle_ef

Assembly: redb.Examples.dll

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

Object→ExampleBase→EfExampleBase→E181_DeleteSingle_ef

Inherited Members

Methods

RunEfAsync(IDbContextFactory<FlatContext>)

Runs the example through EF Core.

public override Task<ExampleResult> RunEfAsync(IDbContextFactory<FlatContext> contexts)