Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
SuppressDbSetInitializationAttribute Class
Collapse the table of content
Expand the table of content

SuppressDbSetInitializationAttribute Class

Entity Framework 5.0

This attribute can be applied to either an entire derived DbContext class or to individual DbSet(Of TEntity) or IDbSet(Of TEntity) properties on that class. When applied any discovered DbSet(Of TEntity) or IDbSet(Of TEntity) properties will still be included in the model but will not be automatically initialized.


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

<AttributeUsageAttribute(AttributeTargets.Class Or AttributeTargets.Property, AllowMultiple := False)> _
Public NotInheritable Class SuppressDbSetInitializationAttribute _
	Inherits Attribute
Dim instance As SuppressDbSetInitializationAttribute

The SuppressDbSetInitializationAttribute type exposes the following members.

Public methodSuppressDbSetInitializationAttributeInitializes a new instance of the SuppressDbSetInitializationAttribute class.

Public propertyTypeId (Inherited from Attribute.)

Public methodEquals (Inherited from Attribute.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Attribute.)
Public methodGetType (Inherited from Object.)
Public methodIsDefaultAttribute (Inherited from Attribute.)
Public methodMatch (Inherited from Attribute.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
© 2015 Microsoft