/// <summary> /// Create new /// </summary> /// <param name="obj"></param> /// <returns></returns> public IObjectData CreateObjectData(object obj) { // technically we could allow metadata to be created for something implementing IDictionary<string,object> // but usually this would represent something that's arleady been mapped. The conservative approach // is to reject them. This can be evaluated in the future. if (obj is IDictionary <string, object> || !IQObjectMapper.Types.IsMappable(obj.GetType())) { return(null); } IObjectData newObjectData = new DbObjectData(obj); ObjectValueData[obj] = newObjectData; return(newObjectData); }
/// <summary> /// Create new /// </summary> /// <param name="obj"></param> /// <returns></returns> public IObjectData CreateObjectData(object obj) { // technically we could allow metadata to be created for something implementing IDictionary<string,object> // but usually this would represent something that's arleady been mapped. The conservative approach // is to reject them. This can be evaluated in the future. if (obj is IDictionary<string, object> || !IQObjectMapper.Types.IsMappable(obj.GetType())) { return null; } IObjectData newObjectData = new DbObjectData(obj); ObjectValueData[obj] = newObjectData; return newObjectData; }