예제 #1
0
        public void Update(int rowIndex, IEntityDataRecord entityData)
        {
            rowIndex += RowOffset;

            _command.CommandText = String.Format(_commandTextTemplate, rowIndex);

            foreach (var mapping in _bagToCommandParamMapping)
            {
                var param = _command.Parameters[mapping.Value];

                object value;
                param.Value = (entityData.TryGetValue(mapping.Key, out value) == TryGetValueResult.Success)
                    ? value.ToString()
                    : "";
            }
        }
 public static bool IsValid(this IEntityDataRecord record)
 {
     return(record.Errors.Count == 0);
 }
        public static bool ContainsValueFor(this IEntityDataRecord record, string propertyName)
        {
            object value;

            return(record.TryGetValue("Date", out value) == TryGetValueResult.Success);
        }