コード例 #1
0
        public BCourse(Course course)
        {
            var     config     = new MapperConfiguration(cfg => cfg.CreateMap <Course, BCourse>());
            Mapper  mapper     = new Mapper(config);
            BCourse tmpBCourse = mapper.Map <BCourse>(course);

            this.Name       = tmpBCourse.Name;
            this.StartedOn  = tmpBCourse.StartedOn;
            this.FinishedOn = tmpBCourse.StartedOn;
        }
コード例 #2
0
 private bool Equals(BCourse other)
 {
     return(Name == other.Name &&
            StartedOn == other.StartedOn &&
            FinishedOn == other.FinishedOn);
 }