public static DiagnosticTestRecord ToDiagnosticTestRecord(DiagnosticTestRecordBindingModel model, DiagnosticTestRecord elem = null) { if (elem == null) { elem = new DiagnosticTestRecord(); } elem.DiagnosticTestId = model.DiagnosticTestId; elem.Description = model.Description; elem.PointNumber = model.PointNumber; return(elem); }
public static DiagnosticTestRecordViewModel ToDiagnosticTestRecord(DiagnosticTestRecord elem) { return(new DiagnosticTestRecordViewModel { Id = elem.Id, DiagnosticTestId = elem.DiagnosticTestId, AnomalyId = elem.AnomalyInfoId, Description = elem.Description, PointNumber = elem.PointNumber }); }