Export (0) Print
Expand All

UnintentionalCodeFirstException Class

Entity Framework 5.0

The exception that is thrown when a context is generated from the DbContext templates in Database First or Model First mode, and is then used in Code First mode.

System.Object
  System.Exception
    System.SystemException
      System.InvalidOperationException
        System.Data.Entity.Infrastructure.UnintentionalCodeFirstException

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

[SerializableAttribute]
public class UnintentionalCodeFirstException : InvalidOperationException

The UnintentionalCodeFirstException type exposes the following members.

  NameDescription
Public methodUnintentionalCodeFirstException()Initializes a new instance of the UnintentionalCodeFirstException class.
Public methodUnintentionalCodeFirstException(String)Initializes a new instance of the UnintentionalCodeFirstException class.
Protected methodUnintentionalCodeFirstException(SerializationInfo, StreamingContext)Initializes a new instance of the UnintentionalCodeFirstException class.
Public methodUnintentionalCodeFirstException(String, Exception)Initializes a new instance of the UnintentionalCodeFirstException class.
Top

  NameDescription
Public propertyData (Inherited from Exception.)
Public propertyHelpLink (Inherited from Exception.)
Public propertyHResult (Inherited from Exception.)
Public propertyInnerException (Inherited from Exception.)
Public propertyMessage (Inherited from Exception.)
Public propertySource (Inherited from Exception.)
Public propertyStackTrace (Inherited from Exception.)
Public propertyTargetSite (Inherited from Exception.)
Top

  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetBaseException (Inherited from Exception.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetObjectDataSecurity Critical. (Inherited from Exception.)
Public methodGetType (Inherited from Exception.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Exception.)
Top

  NameDescription
Protected eventSerializeObjectState (Inherited from Exception.)
Top

Code generated using the T4 templates provided for Database First and Model First use, may not work correctly if used in Code First mode. To use these classes with Code First add any additional configuration using attributes or by using DbModelBuilder and then remove the code that throws this exception.

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