protected Type GetBaseType <T>() { var type = typeof(T); var baseType = Relations.GetBaseType(type); if (baseType == null) { baseType = type; } return(baseType); }
protected IList <object> GetSaveModels <T>() { var type = typeof(T); var baseType = Relations.GetBaseType(type); if (baseType == null) { baseType = type; } if (!DicValues.ContainsKey(baseType)) { DicValues[baseType] = new List <object>(); } return(DicValues[baseType]); }
protected IList <T> Items <T>() { var type = typeof(T); var baseType = Relations.GetBaseType(type); if (baseType == null) { baseType = type; } if (!DicValues.ContainsKey(baseType)) { DicValues[baseType] = new List <object>(); } return(DicValues[baseType].Where(x => x is T).Cast <T>().ToList()); }