public ScoringInfoDTO MapToScoringInfoDTO(ScoringEntity source, ScoringInfoDTO target = null) { if (source == null) { return(null); } if (target == null) { target = new ScoringInfoDTO(); } MapToVersionInfoDTO(source, target); target.ScoringId = source.ScoringId; return(target); }
public ScoringEntity GetScoringEntity(ScoringInfoDTO source) { //if (source == null) // return null; //ScoringEntity target; //if (source.ScoringId == null) // target = new ScoringEntity(); //else // target = DbContext.Set<ScoringEntity>().Find(source.ScoringId); //if (target == null) // throw new EntityNotFoundException(nameof(ScoringEntity), "Could not find Entity in Database.", source.ScoringId); //return target; return(DefaultGet <ScoringInfoDTO, ScoringEntity>(source)); }