Exemplo n.º 1
0
 public static CalendarInfoDto CreateResult(this FtmCalendarInfo calendar)
 {
     return(new CalendarInfoDto()
     {
         RoomName = calendar.CalendarName,
         Description = calendar.Description,
         IsUseable = calendar.IsUseable,
         RoomId = calendar.CalendarId
     });
 }
Exemplo n.º 2
0
 private async Task Save(IEnumerable <CalendarListEntry> calendars)
 {
     foreach (var calendar in calendars)
     {
         if (calendar.Id == configuration["Settings:AdminEmail"])
         {
             continue;
         }
         if (calendar.Id.Contains("vietnamese") || calendar.Id.Contains("holiday") || calendar.Id.Contains("contacts"))
         {
             continue;
         }
         FtmCalendarInfo room = new FtmCalendarInfo()
         {
             CalendarId   = calendar.Id,
             CalendarName = calendar.Summary,
             Description  = calendar.Description,
             IsUseable    = true
         };
         context.FtmCalendarInfo.Add(room);
     }
     await context.SaveChangesAsync();
 }