public static List <TaxonNameViewModel> GetNotRecommendedSwedishNamesViewModel(this ITaxon taxon, bool isInRevision, bool isEditorUser) { List <ITaxonName> swedishNames = taxon.GetTaxonNamesByCategoryId(CoreData.UserManager.GetCurrentUser(), (int)TaxonNameCategoryId.SwedishName); swedishNames = swedishNames.OrderBy(t => t.Category.Id).ThenBy(t => t.Status.SortOrder()).ToList(); List <TaxonNameViewModel> resultList = new List <TaxonNameViewModel>(); foreach (ITaxonName taxonName in swedishNames) { if (taxonName.IsRecommended) { continue; } if (taxonName.NameUsage.Id == (int)TaxonNameUsageId.MisappliedAuctName || taxonName.NameUsage.Id == (int)TaxonNameUsageId.ProParteSynonym) { continue; } if (IsNameOkToShow(taxonName, isInRevision, isEditorUser)) { resultList.Add(new TaxonNameViewModel(taxonName, taxon)); } } ////if (!taxon.CommonName.IsEmpty()) ////{ //// model.OtherValidCommonNames.AddRange( //// from taxonName in taxon.GetTaxonNames(userContext) //// where //// taxonName.Category.Id == (int)TaxonNameCategoryId.SwedishName && //// taxonName.Version != taxon.GetCommonName(userContext).Version //// select taxonName.Name); //// // todo - även ha med att namnet är gilitigt. Hur ser man det??? ////} return(resultList); }