ClearDatabaseSchemaAlways<TContext> Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
An implementation of IDatabaseInitializer<TContext> that will DELETE all resources (e.g. tables, views, functions, and procedures) within a given database schema and re-seed the database regardless of whether the database model has changed. This implementation of IDatabaseInitializer<TContext> is useful if the current user only has permission to access resources within a particular database schema and not the entire database.
public class ClearDatabaseSchemaAlways<TContext> : System.Data.Entity.CreateDatabaseIfNotExists<TContext> where TContext : DbContext
type ClearDatabaseSchemaAlways<'Context (requires 'Context :> DbContext)> = class
inherit CreateDatabaseIfNotExists<'Context (requires 'Context :> DbContext)>
Public Class ClearDatabaseSchemaAlways(Of TContext)
Inherits CreateDatabaseIfNotExists(Of TContext)
Type Parameters
- TContext
The type of DbContext.
- Inheritance
-
CreateDatabaseIfNotExists<TContext>ClearDatabaseSchemaAlways<TContext>
- Derived
Remarks
To seed the database create a derived class and override the Seed
method.
Constructors
ClearDatabaseSchemaAlways<TContext>() |
Initializes a new instance of the ClearDatabaseSchemaAlways<TContext> that will DELETE all resources from the default schema derived from the service name regardless of whether the model has changed. |
ClearDatabaseSchemaAlways<TContext>(String) |
Initializes a new instance of the ClearDatabaseSchemaAlways<TContext> class with a given |
Properties
Schema |
Gets the schema to DELETE all resources from. |
Methods
DeleteAllResourcesFromSchema(TContext) |
DELETE all resources from the Schema. |
InitializeDatabase(TContext) | Executes the strategy to initialize the database for the given context. |
Applies to
Azure SDK for .NET