public bool EditCalendar(CalendarViewModel calendarView, int userId) { if (GetCalendar(calendarView.Id).UserId != userId) { throw new ForbiddenException("Not calendar owner"); } return(_caRepository.EditCalendar(_mapper.Map <CalendarViewModel, Calendar>(calendarView))); }