public static GranuleFuzzyViewModel ToGranuleFuzzy(GranuleFuzzy elem) { return(new GranuleFuzzyViewModel { Id = elem.Id, DiagnosticTestId = elem.DiagnosticTestId, GranulePosition = elem.GranulePosition, FuzzyLabelName = elem.FuzzyLabel.FuzzyLabelName, FuzzyTrendName = elem.FuzzyTrend.TrendName.ToString(), Count = elem.Count }); }
public static GranuleFuzzy ToGranuleFuzzy(GranuleFuzzyBindingModel model, GranuleFuzzy elem = null) { if (elem == null) { elem = new GranuleFuzzy(); } elem.DiagnosticTestId = model.DiagnosticTestId; elem.GranulePosition = model.GranulePosition; elem.FuzzyLabelId = model.FuzzyLabelId; elem.FuzzyTrendId = model.FuzzyTrendId; elem.Count = model.Count; return(elem); }