/// <summary>
 /// set property value
 /// </summary>
 /// <param name="propertyName">property name</param>
 /// <param name="value">value</param>
 public void SetPropertyValue(string propertyName, dynamic value)
 {
     IEnumerableExtension.SetValue(valueDict, propertyName, value);
     if (loadedIdentityValue && EntityManager.IsPrimaryKey(entityType, propertyName))
     {
         loadedIdentityValue = false;
     }
 }
Example #2
0
        /// <summary>
        /// Sets the property or field value
        /// </summary>
        /// <param name="name">Property or field name</param>
        /// <param name="value">Value</param>
        public void SetValue(string name, dynamic value)
        {
            var valueProvider = GetValueProvider(name);

            valueProvider.Set(this, value);
            if (loadedIdentityValue && EntityManager.IsPrimaryKey(entityType, name))
            {
                loadedIdentityValue = false;
            }
        }