private static IDictionary <string, object> InsertEntity(object entity, DataStrategy dataStrategy, string tableName) { var dictionary = entity as IDictionary <string, object>; if (dictionary == null) { dictionary = ObjectEx.ObjectToDictionary(entity); if (dictionary.Count == 0) { throw new SimpleDataException("Could not discover data in object."); } } return(dataStrategy.Insert(tableName, dictionary)); }
public Adapter Create(string adapterName, object settings) { return(Create(adapterName, ObjectEx.ObjectToDictionary(settings))); }
public void Setup(object settings) { Setup(ObjectEx.ObjectToDictionary(settings)); }
public Adapter Create(object settings) { return(Create(ObjectEx.ObjectToDictionary(settings))); }