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, })); }
public async void PostBulk(List <NewUniEvent> newEvents) { await ExecuteFunc(qry => qry.ExecuteAsync(UniEventSql.InsertBulk(newEvents, false))); }