コード例 #1
0
        /// <summary>
        ///     Initializes a new instance of the <see cref = "DbUpdateException" /> class.
        /// </summary>
        /// <param name = "internalContext">The internal context.</param>
        /// <param name = "innerException">The inner exception.</param>
        internal DbUpdateException(
            InternalContext internalContext, UpdateException innerException, bool involvesIndependentAssociations)
            : base(
                involvesIndependentAssociations
                    ? Strings.DbContext_IndependentAssociationUpdateException
                    : innerException.Message,
                innerException)
        {
            _internalContext = internalContext;
            _state.InvolvesIndependentAssociations = involvesIndependentAssociations;

            SubscribeToSerializeObjectState();
        }
コード例 #2
0
 private void UpdateExceptionHandler(UpdateException ex)
 {
     Logger.ErrorException("An Constraint or Data Exception Occurred Updating Entities", ex);
 }