Exemplo n.º 1
0
 public static DriverInformation Mapper(MotorsportSite.DataLevel.Drivers.Models.Driver dataModel, DriverCalculationInfo calcInfo)
 {
     return(new DriverInformation
     {
         Id = dataModel.Id,
         CatagoryId = dataModel.CatagoryId,
         FirstName = dataModel.FirstName,
         LastName = dataModel.LastName,
         ShortName = dataModel.ShortName,
         DriverNumber = dataModel.DriverNumber,
         DOB = dataModel.DOB,
         Country = dataModel.Country,
         PlaceOfBirth = dataModel.PlaceOfBirth,
         TotalPoints = calcInfo.TotalPoints,
         TotalPointsOfCurrentSeason = calcInfo.TotalPointsOfCurrentSeason,
         HighestResult = calcInfo.HighestResult,
         TotalNumOfHighestResult = calcInfo.TotalNumOfHighestResult,
         BestTrack = calcInfo.BestTrack,
         NumRaceFastestLaps = calcInfo.NumRaceFastestLaps,
         NumOfRacesCompleted = calcInfo.NumOfRacesCompleted,
         NumDNFs = calcInfo.NumDNFs,
         TotalLapsComplete = calcInfo.TotalLapsComplete,
         BestSeason = calcInfo.BestSeason,
         NumChapionships = calcInfo.NumChapionships
     });
 }
Exemplo n.º 2
0
 public static Driver MapFromDb(MotorsportSite.DataLevel.Drivers.Models.Driver dataModel)
 {
     return(new Driver
     {
         Id = dataModel.Id,
         CatagoryId = dataModel.CatagoryId,
         FirstName = dataModel.FirstName,
         LastName = dataModel.LastName,
         ShortName = dataModel.ShortName,
         DriverNumber = dataModel.DriverNumber,
         DOB = dataModel.DOB,
         Country = dataModel.Country,
         PlaceOfBirth = dataModel.PlaceOfBirth,
         TeamName = dataModel.TeamName,
         TeamColour = dataModel.TeamColour
     });
 }