src/Shared/EntityFramework/DropCreateDatabaseAlways`.cs
/// <summary>
/// Executes the strategy to initialize the database for the given context.
/// </summary>
/// <param name="context"> The context. </param>
/// <exception cref="ArgumentNullException">
/// <paramref name="context" />
/// is
/// <c>null</c>
/// .
/// </exception>
Executes the strategy to initialize the database for the given context.
Executes the strategy to initialize the database for the given context .
public virtual void InitializeDatabase(TContext context)
        {
            Check.NotNull(context, "context");
            context.Database.Delete();
            context.Database.Create(DatabaseExistenceState.DoesNotExist);
            Seed(context);
            context.SaveChanges();
        }
public virtual void InitializeDatabase ( TContext context ) { Check . NotNull ( context , " " ) ; context . Database . Delete ( ) ; context . Database . Create ( DatabaseExistenceState . DoesNotExist ) ; Seed ( context ) ; context . SaveChanges ( ) ; }
Executes the strategy to initialize the database for the given context.
Executes the strategy to initialize the database for the given context .
None
context
TContext
None