public static BaseFixtureDto AssembleDto(this Com.BinaryBracket.BowlsResults.Competition.Domain.Entities.Fixture.Fixture fixture) { if (fixture is PlayerFixture playerFixture) { return(PlayerFixtureDtoAssembler.AssembleDto(playerFixture)); } if (fixture is TeamFixture teamFixture) { return(teamFixture.AssembleDto()); } throw new NotImplementedException("Only Player Dto Supported"); }
public static ResultDto AssembleFixtureEntrant2Score(this Com.BinaryBracket.BowlsResults.Competition.Domain.Entities.Fixture.Fixture data) { ResultDto dto = null; if (data.FixtureStatusID == FixtureStatuses.Complete) { dto = new ResultDto(); dto.ResultType = data.Entrant2ResultTypeID.Value; dto.GameScore = data.Entrant2GameScore.Value; dto.ChalkScore = data.Entrant2ChalkScore.Value; dto.BonusScore = data.Entrant2BonusScore; dto.ChalkHandicap = null; dto.IsWalkover = data.Entrant2Walkover.Value; } return(dto); }