public async Task AddCalendarEntry(Guid server, DateTime firstRun, Periodicity periodicity, IEnumerable <string> items) { var entry = new DBCalendarEntry { Server = server, FirstRun = firstRun, Periodicity = periodicity, Values = new int[] { }, Items = items }; entry.UpdateNextRun(); await dataBase.AddCalendarEntry(entry); }
public async Task <Guid> AddCalendarEntry(DBCalendarEntry entry) { if (entry.Id == Guid.Empty) { entry.Id = Guid.NewGuid(); } await TblCalendarEntry.Insert(entry, false).ExecuteAsync().ConfigureAwait(false); return(entry.Id); }
public async Task <IActionResult> Post([FromBody] DBCalendarEntry calEntry) { calEntry.Id = await metaDB.AddCalendarEntry(calEntry); return(Ok(calEntry)); }