Class DataContextException
Base type for errors raised by a IDataContext.
[Serializable]
public class DataContextException : Exception, ISerializable
- Inheritance
-
DataContextException
- Implements
- Derived
- Inherited Members
- Extension Methods
Remarks
The library's domain exceptions (BuildSqlCommandException and QueryPreparationException) derive from this type, so callers can catch a single library-wide base.
Constructors
DataContextException()
Initializes a new instance of the DataContextException class.
public DataContextException()
DataContextException(SerializationInfo, StreamingContext)
Initializes a new instance of the DataContextException class from serialized data.
[Obsolete(DiagnosticId = "SYSLIB0051")]
protected DataContextException(SerializationInfo info, StreamingContext context)
Parameters
infoSerializationInfoThe object that holds the serialized object data.
contextStreamingContextContextual information about the source or destination of the serialization.
DataContextException(string?)
Initializes a new instance of the DataContextException class with a specified error message.
public DataContextException(string? message)
Parameters
messagestringThe message that describes the error.
DataContextException(string?, Exception?)
Initializes a new instance of the DataContextException class with a specified error message and a reference to the inner exception that caused it.
public DataContextException(string? message, Exception? innerException)