internal static IEntityPropertyDictionary MergeDicts(IEntityPropertyDictionary dictionary) { return(dictionary == null ? new Dictionary <string, EntityProperty>() : dictionary .ToDictionary( entry => entry.Key, entry => entry.Value)); }
internal static DateTimeOffset ReadTimestamp(IEntityPropertyDictionary properties, string key) { if (properties.ContainsKey(key)) { var val = properties[key].DateTimeOffsetValue; if (!val.HasValue) { return(DateTime.MinValue); } else { return(val.Value); } } else { //return DateTime.MinValue; return(DateTime.Now); } }
internal static void WriteTimestamp(IEntityPropertyDictionary prop, string key, DateTimeOffset val) { Debug.Assert(!prop.ContainsKey(key)); prop[key] = new EntityProperty(val); }