Beispiel #1
0
 private void AddAllColumns <TColumn>(string tableName)
 {
     foreach (var entry in FluentEntityAdoHelper.GetAllColumnProperties(typeof(TColumn)))
     {
         AddColumnData(tableName, entry);
     }
 }
Beispiel #2
0
 public FluentEntityAdoInsert(IDaoHelper daoHelper, IEnumerable <T> entities)
 {
     _daoHelper      = daoHelper ?? throw new ArgumentNullException(nameof(daoHelper));
     _properties     = FluentEntityAdoHelper.GetAllColumnProperties(typeof(T)).ToList();
     _commandBuilder = new StringBuilder();
     _inserts        = new Dictionary <string, IList <IList <QueryParameter> > >();
     _baseCommand    = $"INSERT INTO {FluentEntityAdoHelper.GetTableName(typeof(T))} (";
     ParseCommands(entities);
 }
Beispiel #3
0
 public FluentEntityAdoUpdate(IDaoHelper daoHelper, IEnumerable <T> entities)
 {
     _daoHelper  = daoHelper ?? throw new ArgumentNullException(nameof(daoHelper));
     _properties = FluentEntityAdoHelper.GetAllColumnProperties(typeof(T)).ToList();
     _commands   = new Dictionary <string, IList <IList <QueryParameter> > >
     {
         { PrepareBaseCommand(), PrepareQueryParameters(entities) }
     };
 }