Create() public méthode

Создает новую группу.
public Create ( TeamItem team ) : int
team IS.Model.Item.Team.TeamItem Группу.
Résultat int
Exemple #1
0
        public void SetUp()
        {
            _transactionScope = new TransactionScope();
            _studentRepository = new StudentRepository();
            _personRepository = new PersonRepository();
            _teamRepository = new TeamRepository();
            _specialtyDetailRepository = new SpecialtyDetailRepository();
            _specialtyRepository = new SpecialtyRepository();
            _cathedraRepository = new CathedraRepository();
            _facultyRepository = new FacultyRepository();

            _team = new TeamItem()
            {
                CreateDate = DateTime.Now,
                Name = "ПЕ-22б",
                SpecialtyDetailId = _specialtyDetailRepository.Create(new SpecialtyDetailItem()
                {
                    SpecialtyId = _specialtyRepository.Create(new SpecialtyItem()
                    {
                        CathedraId = _cathedraRepository.Create(new CathedraItem()
                        {
                            FacultyId = _facultyRepository.Create(new FacultyItem()),
                            FullName = "Кафедра",
                            ShortName = "K"
                        }),
                        FullName = "Специальность",
                        ShortName = "С",
                        Code = "1"
                    }),
                    ActualDate = DateTime.Now
                })
            };

            _student = new StudentItem()
            {
                LastName = "Егоров",
                FirstName = "Виталий",
                FatherName = "Игоревич",
                Birthday = DateTime.Now,
                TeamId = _teamRepository.Create(_team)
            };
            _student.Id = _personRepository.Create(_student);

            _studentNew = new StudentItem()
            {
                LastName = "Журавлев",
                FirstName = "Данил",
                FatherName = "Александрович",
                Birthday = DateTime.Now,
                TeamId = _teamRepository.Create(_team)
            };
            _studentNew.Id = _personRepository.Create(_student);
        }