Пример #1
0
        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));
        }
Пример #2
0
 public Adapter Create(string adapterName, object settings)
 {
     return(Create(adapterName, ObjectEx.ObjectToDictionary(settings)));
 }
Пример #3
0
 public void Setup(object settings)
 {
     Setup(ObjectEx.ObjectToDictionary(settings));
 }
Пример #4
0
 public Adapter Create(object settings)
 {
     return(Create(ObjectEx.ObjectToDictionary(settings)));
 }