// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
namespace System.Data.Entity.Infrastructure
{
///
/// A factory for creating derived instances. Implement this
/// interface to enable design-time services for context types that do not have a
/// public default constructor.
/// At design-time, derived instances can be created in order to enable specific
/// design-time experiences such as model rendering, DDL generation etc. To enable design-time instantiation
/// for derived types that do not have a public, default constructor, implement
/// this interface. Design-time services will auto-discover implementations of this interface that are in the
/// same assembly as the derived type.
///
///
public interface IDbContextFactory
where TContext : DbContext
{
///
/// Creates a new instance of a derived type.
///
/// An instance of TContext
TContext Create();
}
}