示例#1
0
 private bool Equals(BStudent actual)
 {
     return(actual != null &&
            Name == actual.Name &&
            Surname == actual.Surname &&
            Rate == actual.Rate &&
            GroupId == actual.GroupId &&
            Phone == actual.Phone &&
            Email == actual.Email &&
            Contract == actual.Contract &&
            Birthday == actual.Birthday &&
            MiddleName == actual.MiddleName &&
            Git == actual.Git &&
            CityId == actual.CityId &&
            Status == actual.Status);
 }
示例#2
0
        public BStudent(Student student)
        {
            var      config      = new MapperConfiguration(cfg => cfg.CreateMap <Student, BStudent>());
            Mapper   mapper      = new Mapper(config);
            BStudent tmpBStudent = mapper.Map <BStudent>(student);

            this.Name       = tmpBStudent.Name;
            this.Surname    = tmpBStudent.Surname;
            this.Rate       = tmpBStudent.Rate;
            this.GroupId    = tmpBStudent.GroupId;
            this.Email      = tmpBStudent.Email;
            this.Contract   = tmpBStudent.Contract;
            this.Birthday   = tmpBStudent.Birthday;
            this.MiddleName = tmpBStudent.MiddleName;
            this.Git        = tmpBStudent.Git;
            this.CityId     = tmpBStudent.CityId;
            this.Status     = tmpBStudent.Status;
        }