public static ClassifierSearchSettingsElastic ToClassifierSearchSettingsElastic(this ClassifierSettings classifier, ClassifierSearchSettingsElastic original = null) { var model = new ClassifierSearchSettingsElastic { Id = !string.IsNullOrEmpty(classifier.Id) ? classifier.Id : original?.Id, Count = classifier.Count.HasValue ? classifier.Count.Value : (int)original?.Count, }; return(model); }
public static ClassifierSettings ToClassifierSettingsModel(this ClassifierSearchSettingsElastic classifier) { var model = new ClassifierSettings { Id = classifier.Id, Count = classifier.Count }; return(model); }