예제 #1
0
        public int AddCalendar(CalendarViewModel calendar, int userId)
        {
            if (calendar.UserId != userId)
            {
                throw new ForbiddenException("Not calendar owner");
            }

            return(_caRepository.AddCalendar(_mapper.Map <CalendarViewModel, Calendar>(calendar)));
        }