public CalendarEventModel InsertCalendarEvent(CalendarEventModel model) { if (model.AllDayEvent && model.StartDate != null) { RemoveAllDayEvents(model.CalendarId, model.StartDate.Value); } var inserted = _events.Insert(model); return(GetCalendarEvent(inserted.Id)); }
public IActionResult PostEvent([FromBody] CalendarEventModel model) { return(Post(_service.InsertCalendarEvent, AuditNew(model))); }
public IActionResult PutEvent(int id, [FromBody] CalendarEventModel model) { return(Put(_service.UpdateCalendarEvent, AuditExisting(model))); }
public CalendarEventModel UpdateCalendarEvent(CalendarEventModel model) { _events.Update(model); return(GetCalendarEvent(model.Id)); }