Пример #1
0
        /// <summary>
        /// Add notification type
        /// </summary>
        /// <param name="notificationType"></param>
        /// <returns></returns>
        public int AddNotificationType(NotificationTypeDomain notificationType)
        {
            ValidateNotificationTypeModel(notificationType);

            bool codeExists = _repository.GetAllByCode(notificationType.Code).Count > 0;

            ValidationHelper.IsFalse(codeExists, NotificationMessages.NotificationTypeCodeExists);

            return(_repository.Add(notificationType));
        }