public static object FormatAppointment(this Appointment appointment) { return(new { beginDate = DateTimeFormatter.FormatDateTimeToUtc(appointment.BeginDate), endDate = DateTimeFormatter.FormatDateTimeToUtc(appointment.EndDate), }); }
public static object FormatAppointmentsDaySlots(this List <Slot> slots) { return(slots.Select(s => new { beginDate = DateTimeFormatter.FormatDateTimeToUtc(s.BeginDate), endDate = DateTimeFormatter.FormatDateTimeToUtc(s.EndDate), bestSlot = s.BestSlot }).ToArray()); }