コード例 #1
0
ファイル: ModelExtension.cs プロジェクト: nhat-tong/EscarGo
        public static Concurrent ToConcurrent(this RaceEntity entity)
        {
            Concurrent concurrent = new Concurrent();

            concurrent.Nom          = entity.Concurrent;
            concurrent.ConcurrentId = Convert.ToInt32(entity.PartitionKey);
            concurrent.SC           = entity.SC;

            return(concurrent);
        }
コード例 #2
0
ファイル: ModelExtension.cs プロジェクト: nhat-tong/EscarGo
        public static RaceEntity ToRaceEntity(this Course course)
        {
            RaceEntity raceEntity = new RaceEntity();

            raceEntity.Date      = course.Date;
            raceEntity.Label     = course.Label;
            raceEntity.Pays      = course.Pays;
            raceEntity.Likes     = course.Likes;
            raceEntity.SC        = course.SC;
            raceEntity.Ville     = course.Ville;
            raceEntity.NbTickets = course.NbTickets;

            return(raceEntity);
        }
コード例 #3
0
ファイル: ModelExtension.cs プロジェクト: nhat-tong/EscarGo
        public static Course ToCourse(this RaceEntity entity)
        {
            Course course = new Course();

            course.Date      = entity.Date;
            course.CourseId  = Convert.ToInt32(entity.PartitionKey);
            course.Label     = entity.Label;
            course.Likes     = entity.Likes;
            course.Pays      = entity.Pays;
            course.SC        = entity.SC;
            course.Ville     = entity.Ville;
            course.NbTickets = entity.NbTickets;

            return(course);
        }