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));
        }
Ejemplo n.º 2
0
 public IActionResult PostEvent([FromBody] CalendarEventModel model)
 {
     return(Post(_service.InsertCalendarEvent, AuditNew(model)));
 }
Ejemplo n.º 3
0
 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));
 }