public static CsvApprenticeshipRow FromModel(ApprenticeshipUploadRow row) => new CsvApprenticeshipRow() { StandardCode = row.StandardCode.ToString(), StandardVersion = row.StandardVersion.ToString(), ApprenticeshipInformation = row.ApprenticeshipInformation, ApprenticeshipWebpage = row.ApprenticeshipWebpage, ContactEmail = row.ContactEmail, ContactPhone = row.ContactPhone, ContactUrl = row.ContactUrl, DeliveryMethod = row.DeliveryMethod, VenueName = row.VenueName, YourVenueReference = row.YourVenueReference, Radius = row.Radius, DeliveryModes = row.DeliveryModes, NationalDelivery = row.NationalDelivery, SubRegion = row.SubRegions };
public new static CsvApprenticeshipRowWithErrors FromModel(ApprenticeshipUploadRow row) => new CsvApprenticeshipRowWithErrors() { StandardCode = row.StandardCode.ToString(), StandardVersion = row.StandardVersion.ToString(), ApprenticeshipInformation = row.ApprenticeshipInformation, ApprenticeshipWebpage = row.ApprenticeshipWebpage, ContactEmail = row.ContactEmail, ContactPhone = row.ContactPhone, ContactUrl = row.ContactUrl, DeliveryMethod = row.DeliveryMethod, VenueName = row.VenueName, YourVenueReference = row.YourVenueReference, Radius = row.Radius, DeliveryModes = row.DeliveryModes, NationalDelivery = row.NationalDelivery, SubRegion = row.SubRegions, Errors = string.Join( "\n", row.Errors.Select(errorCode => ErrorRegistry.All[errorCode].GetMessage()).Distinct()) };