Exemple #1
0
 public void Post(NewUniEvent newEvent)
 {
     var result = ExecuteFunc(qry => qry.ExecuteAsync(UniEventSql.Insert(), new
     {
         StartTime   = newEvent.StartTime,
         EndTime     = newEvent.EndTime,
         Unit        = (int)newEvent.Unit,
         EventType   = (int)newEvent.EventType,
         EventLeader = newEvent.EventLeader.Length > 50 ? newEvent.EventLeader.PadRight(newEvent.EventLeader.Length).Substring(0, 49) : newEvent.EventLeader,
     }));
 }
Exemple #2
0
 public async void PostBulk(List <NewUniEvent> newEvents)
 {
     await ExecuteFunc(qry => qry.ExecuteAsync(UniEventSql.InsertBulk(newEvents, false)));
 }