public AddPenaltyDTO MapToPenaltyDTO(AddPenaltyEntity source, AddPenaltyDTO target = null)
        {
            if (source == null)
            {
                return(null);
            }
            if (target == null)
            {
                target = new AddPenaltyDTO();
            }

            target.ScoredResultRowId = source.ScoredResultRowId;
            target.PenaltyPoints     = source.PenaltyPoints;

            return(target);
        }
        public AddPenaltyEntity MapToPenaltyEntity(AddPenaltyDTO source, AddPenaltyEntity target = null)
        {
            if (source == null)
            {
                return(null);
            }
            if (target == null)
            {
                target = GetPenaltyEntity(source);
            }

            target.ScoredResultRow = GetScoredResultRowEntity(new ScoredResultRowDataDTO()
            {
                ScoredResultRowId = source.ScoredResultRowId
            });
            target.PenaltyPoints = source.PenaltyPoints;

            return(target);
        }
        public AddPenaltyEntity MapToPenaltyEntity(AddPenaltyDTO source, AddPenaltyEntity target = null)
        {
            if (source == null)
            {
                return(null);
            }
            if (target == null)
            {
                target = GetPenaltyEntity(source);
            }

            target.ScoredResultRow = GetScoredResultRowEntity(new ScoredResultRowDataDTO()
            {
                ScoredResultRowId = source.ScoredResultRowId
            });
            target.PenaltyPoints = source.PenaltyPoints;
            if (target.ScoredResultRow?.ScoredResult?.Result != null)
            {
                target.ScoredResultRow.ScoredResult.Result.RequiresRecalculation = true;
            }

            return(target);
        }