public CalendarItem Parse(CalendarItemModel calEntry) { CalendarItem entry = new CalendarItem(); entry.Author = new UserModel(); entry.Editor = new UserModel(); try { entry.Author.LookupId = calEntry.Author.LookupId; entry.Description = calEntry.Description; entry.Editor.LookupId = calEntry.Editor.LookupId; entry.EndDate = TimeZoneInfo.ConvertTimeToUtc(calEntry.EndDate); entry.EventDate = TimeZoneInfo.ConvertTimeToUtc(calEntry.EventDate); entry.Location = calEntry.Location; entry.Title = calEntry.Title; entry.Author = calEntry.Author; entry.Editor = calEntry.Editor; entry.SiteUrl = calEntry.SiteUrl; entry.ListName = calEntry.ListName; return(entry); } catch (Exception ex) { return(null); } }