Example #1
0
        public void RemoveDepartment(ProjectDepartment projectDepartment)
        {
            projectDepartment.Validate();

            if (!ProjectDepartments.Any(i => i.Id == projectDepartment.Id))
            {
                throw new ValidationException("PROJDEPARTMENT-02");
            }

            ProjectDepartments.Update(projectDepartment);
        }
Example #2
0
        //public DictionaryValue Probability { get; private set; }
        //public DictionaryValue Statement { get; private set; }


        //public ICollection<User> Users { get; private set; }
        //public ICollection<Task> Tasks { get; private set; }
        //public DomainState State { get; private set; }

        public void AddDepartment(ProjectDepartment projectDepartment)
        {
            projectDepartment.Validate();

            if (ProjectDepartments.Any(i => i.Id == projectDepartment.Id))
            {
                throw new ValidationException("PROJDEPARTMENT-01");
            }

            ProjectDepartments.Add(projectDepartment);
        }