/// <summary>
 /// Adds a new entity error notification.
 /// </summary>
 /// <param name="target">Target name</param>
 /// <param name="code">Notification code</param>
 /// <param name="attributes">Optional notification attributes</param>
 /// <param name="exception">Optional notification exception</param>
 /// <returns>This exception object</returns>
 /// <remarks>
 /// This method can be used directly in throw statement.
 /// </remarks>
 public BusinessOperationException AddEntityError(string target, string code,
                                                  IList <object> attributes = null, Exception exception = null)
 {
     EnsureNotifications();
     Notifications.AddEntityError(target, code, attributes, exception);
     return(this);
 }