public static SamplePlanRejectModel ToModel(this SamplePlanReject aRejectEntity) { return(new SamplePlanRejectModel() { SamplePlanId = aRejectEntity.SamplePlanId, SamplePlanLevelId = aRejectEntity.SamplePlanLevelId, InspectTestTypeId = aRejectEntity.InspectTestId, SampleQty = aRejectEntity.SampleQty, RejectAllowQty = aRejectEntity.RejectAllowQty }); }
public static SamplePlanRejectModel ToHydratedModel(this SamplePlanReject aRejectEntity) { return(new SamplePlanRejectModel() { SamplePlanId = aRejectEntity.SamplePlanId, SamplePlanLevelId = aRejectEntity.SamplePlanLevelId, InspectTestTypeId = aRejectEntity.InspectTestId, SampleQty = aRejectEntity.SampleQty, RejectAllowQty = aRejectEntity.RejectAllowQty, InspectionTestType = (aRejectEntity.InspectTest != null) ? aRejectEntity.InspectTest.ToModel() : null }); }