private async static void AddIntervalAsync(Interval i) { var conn = DbConnectionAsync; await conn.InsertAsync(i).ContinueWith((t) => { if (t.IsCompleted) { foreach (var x in i.SeznamTerminovZaAlarm) { x.IntervalId = GetLastIntervalkId(); AddTermin(x); } } }); }
//------------------------------------------------------------------ //Interval private static void AddInterval(Interval i) { foreach (var x in i.SeznamTerminovZaAlarm) { AddTermin(x); } using (var db = DbConnection) { db.Insert(i); } }