DbConfigurationTypeAttribute Class
This attribute can be placed on a subclass of DbContext to indicate that the subclass of DbConfiguration representing the code-based configuration for the application is in a different assembly than the context type.
Assembly: EntityFramework (in EntityFramework.dll)
[SuppressMessageAttribute("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes")] [SuppressMessageAttribute("Microsoft.Design", "CA1019:DefineAccessorsForAttributeArguments")] [AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = false)] public class DbConfigurationTypeAttribute : Attribute
Name | Description | |
---|---|---|
![]() | DbConfigurationTypeAttribute(String) | Indicates that the subclass of DbConfiguration represented by the given assembly-qualified name should be used for code-based configuration for this application. |
![]() | DbConfigurationTypeAttribute(Type) | Indicates that the given subclass of DbConfiguration should be used for code-based configuration for this application. |
Name | Description | |
---|---|---|
![]() | ConfigurationType | Gets the subclass of DbConfiguration that should be used for code-based configuration for this application. |
![]() | TypeId | (Inherited from Attribute.) |
Name | Description | |
---|---|---|
![]() | Equals(Object) | (Inherited from Attribute.) |
![]() | Finalize() | (Inherited from Object.) |
![]() | GetHashCode() | (Inherited from Attribute.) |
![]() | GetType() | (Inherited from Object.) |
![]() | IsDefaultAttribute() | (Inherited from Attribute.) |
![]() | Match(Object) | (Inherited from Attribute.) |
![]() | MemberwiseClone() | (Inherited from Object.) |
![]() | ToString() | (Inherited from Object.) |
Name | Description | |
---|---|---|
![]() ![]() | _Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) | (Inherited from Attribute.) |
![]() ![]() | _Attribute.GetTypeInfo(UInt32, UInt32, IntPtr) | (Inherited from Attribute.) |
![]() ![]() | _Attribute.GetTypeInfoCount(UInt32) | (Inherited from Attribute.) |
![]() ![]() | _Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) | (Inherited from Attribute.) |
Normally a subclass of DbConfiguration should be placed in the same assembly as the subclass of DbContext used by the application. It will then be discovered automatically. However, if this is not possible or if the application contains multiple context types in different assemblies, then this attribute can be used to direct DbConfiguration discovery to the appropriate type. An alternative to using this attribute is to specify the DbConfiguration type to use in the application's config file. See http://go.microsoft.com/fwlink/?LinkId=260883 for more information.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.