IS.Model.Service.AuditoryService.Update C# (CSharp) Method

Update() public method

Измененяет данные об аудитории.
public Update ( AuditoryItem auditory ) : void
auditory IS.Model.Item.Auditory.AuditoryItem Аудитория.
return void
        public void Update(AuditoryItem auditory)
        {
            if (string.IsNullOrEmpty(auditory.FullName))
            {
                throw new Exception("Поле 'FullName' не должно быть пустым.");
            }
            if (string.IsNullOrEmpty(auditory.Memo))
            {
                throw new Exception("Поле 'Memo' не должно быть пустым.");
            }
            if (GetById(auditory.Id) == null)
            {
                throw new Exception("Аудитория не найдена.");
            }
            _auditoryRepository.Update(auditory);
        }