示例#1
0
 public static EntityRecord CreateRecord(
     this Entity entity,
     NameValueCollection request,
     string prefix = "",
     Func <object, object> valueMutator = null)
 {
     return(entity.CreateRecord(
                request.ToDictionary().ToDictionary(x => x.Key, x => (object)x.Value),
                prefix,
                valueMutator));
 }
示例#2
0
        public static EntityRecord CreateRecord(
            this Entity entity,
            string key,
            IValueProvider valueProvider,
            IFormFileCollection files,
            Func <Property, object> defaultValueResolver = null)
        {
            var entityRecord = entity.CreateRecord(valueProvider, files, defaultValueResolver);

            entityRecord.SetKeyValue(key);

            return(entityRecord);
        }