Esempio n. 1
0
            public T GetValue <T>(InternalEntityEntry entry, IProperty property, int index)
            {
                if (index == -1)
                {
                    throw new InvalidOperationException(
                              CoreStrings.OriginalValueNotTracked(property.Name, property.DeclaringEntityType.DisplayName()));
                }

                return(IsEmpty ? entry.GetCurrentValue <T>(property) : _values.GetValue <T>(index));
            }
Esempio n. 2
0
 public T GetValue<T>(InternalEntityEntry entry, IPropertyBase propertyBase, int index)
     => IsEmpty
         ? entry.GetCurrentValue<T>(propertyBase)
         : _values.GetValue<T>(index);
 /// <summary>
 ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
 ///     directly from your code. This API may change or be removed in future releases.
 /// </summary>
 public virtual string BuildKeyValuesString(InternalEntityEntry entry)
 => _property.Name + ":" + entry.GetCurrentValue(_property);
Esempio n. 4
0
 /// <summary>
 ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
 ///     directly from your code. This API may change or be removed in future releases.
 /// </summary>
 public virtual IProperty FindNullPropertyInCurrentValues(InternalEntityEntry entry)
 => Properties.FirstOrDefault(p => entry.GetCurrentValue(p) == null);
Esempio n. 5
0
 /// <summary>
 ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
 ///     directly from your code. This API may change or be removed in future releases.
 /// </summary>
 public virtual string BuildKeyValuesString(InternalEntityEntry entry)
 => string.Join(", ", Properties.Select(p => p.Name + ":" + entry.GetCurrentValue(p)));