Example #1
0
 public RecordDoesNotExistException(IDatabaseObjects collection, IDatabaseObject item)
     : base(collection.GetType().Name + ": '" + item.DistinctValue.ToString() + "' could not be updated because the associated record does not exist in the database.")
 {
 }
Example #2
0
 /// <summary>
 /// Throwns an exception if the key field name is "".
 /// </summary>
 private void EnsureKeyFieldNameIsSet(string keyFieldName, IDatabaseObjects collection)
 {
     if (String.IsNullOrEmpty(keyFieldName))
         throw new InvalidOperationException("The KeyFieldAttribute has not been specified or the KeyFieldName function overridden for " + collection.GetType().FullName);
 }
Example #3
0
 public ObjectDoesNotExistException(IDatabaseObjects objCollection, object objDistinctOrKeyValue)
     : base(objCollection.GetType().Name + ": '" + objDistinctOrKeyValue.ToString() + "'")
 {
     pobjDistinctOrKeyValue = objDistinctOrKeyValue;
 }