コード例 #1
0
 public IEnumerable <ShooterWithStageAndCompetitionPointsShowModel> GetShooters()
 => ShooterRepository.GetStageAndCompetitionPoints(stage.ID)
 .Select(x => new ShooterWithStageAndCompetitionPointsShowModel(x.Id,
                                                                x.Position,
                                                                x.Name,
                                                                x.Surname,
                                                                x.StagePoints,
                                                                x.CompetitionPoints));
コード例 #2
0
        public string GetBestShooter()
        {
            var shooter = ShooterRepository.GetBestShooter(stage.ID);

            if (shooter is null)
            {
                return(null);
            }

            return($"{shooter.Name} {shooter.Surname} : {shooter.Points}pkt");
        }
コード例 #3
0
 public IEnumerable <Shooter> GetAllShooters()
 => ShooterRepository.GetAllShooters();
 public ShowShooterInCompetitionModel(uint shooterId, uint competitionId)
 {
     shooter     = ShooterRepository.GetShooter(shooterId);
     competition = CompetitionRepository.GetCompetition(competitionId);
 }
コード例 #5
0
 public Boolean DeleteShooter(UInt32 shooterID)
 => ShooterRepository.DeleteShooter(shooterID);
コード例 #6
0
 public Boolean EditShooter(Shooter shooter, UInt32 id)
 => ShooterRepository.EditShooter(shooter, id);
コード例 #7
0
 public uint GetPositionOnStage()
 => ShooterRepository.GetPositionOnStage(shooter.ID, stage.ID);
コード例 #8
0
 public Boolean AddShooter(Shooter shooter)
 => ShooterRepository.AddShooter(shooter);
コード例 #9
0
 public string GetStagePoints()
 => $"{ShooterRepository.GetStagePoints(shooter.ID, stage.ID):N3}";
コード例 #10
0
 public string GetStageTime()
 => $"{TimeSpan.FromSeconds(ShooterRepository.GetStageTime(shooter.ID, stage.ID)):g}";
コード例 #11
0
 public string GetAvgPosition()
 => $"{ShooterRepository.GetGeneralAvgPosition(shooter.ID):N2}";
コード例 #12
0
 public string GetDeltaAccuracy()
 => $"{ShooterRepository.GetAccuracy(AccuracyTypeEnum.Delta, shooter.ID, stage.ID):P2}";
コード例 #13
0
 public string GetCharlieAccuracy()
 => $"{ShooterRepository.GetAccuracy(AccuracyTypeEnum.Charlie, shooter.ID, stage.ID):P2}";
コード例 #14
0
 public string GetGeneralAccuracy()
 => $"{ShooterRepository.GetAccuracy(AccuracyTypeEnum.General,shooter.ID, stage.ID):P2}";
コード例 #15
0
 public ShowShooterOnStageModel(uint shooterId, uint stageId)
 {
     shooter = ShooterRepository.GetShooter(shooterId);
     stage   = StageRepository.GetStage(stageId);
 }