DropCreateDatabaseIfModelChanges<TContext>.Seed Method

[This page is specific to the Entity Framework version 6. The latest version is available as the 'Entity Framework' NuGet package. For more information about Entity Framework, see msdn.com/data/ef.]

A method that should be overridden to actually add data to the context for seeding. The default implementation does nothing.

Namespace:  System.Data.Entity
Assembly:  EntityFramework (in EntityFramework.dll)

Syntax

'Declaration
Protected Overridable Sub Seed ( _
    context As TContext _
)
'Usage
Dim context As TContext

Me.Seed(context)
protected virtual void Seed(
    TContext context
)
protected:
virtual void Seed(
    TContext context
)
abstract Seed : 
        context:'TContext -> unit  
override Seed : 
        context:'TContext -> unit
protected function Seed(
    context : TContext
)

Parameters

  • context
    Type: TContext
    The context to seed.

See Also

Reference

DropCreateDatabaseIfModelChanges<TContext> Class

System.Data.Entity Namespace