Beispiel #1
0
        private object GetPrimaryKeyValuesOf(
            EntityEntry dbEntry,
            List <PropertyConfigurationKey> properties)
        {
            if (properties.Count == 0)
            {
                throw new KeyNotFoundException("key not found for " + dbEntry.Entity.GetType().FullName);
            }

            if (properties.Count == 1)
            {
                return(_dbEntryValuesWrapper.OriginalValue(properties.First().PropertyName));
            }

            string output = "[";

            output += string.Join(",",
                                  properties.Select(colName => _dbEntryValuesWrapper.OriginalValue(colName.PropertyName)));

            output += "]";
            return(output);
        }
 protected virtual object OriginalValue(string propertyName)
 {
     return(_dbEntryValuesWrapper.OriginalValue(propertyName));
 }