var _pool = new Dictionary<Type, Dictionary<EntityIdType, Object>>();
public IEnumerable<EntityType> GetItems<EntityType>()
{
Type myType = typeof(EntityType);
if (!_pool.ContainsKey(myType))
return new EntityType[0];
//does not work, always returns null
// return _pool[myType].Values; as IEnumerable<EntityType>;
//hack: cannot cast Values to IEnumarable directly
List<EntityType> foundItems = new List<EntityType>();
foreach (EntityType entity in _pool[myType].Values)
{
foundItems.Add(entity);
}
return foundItems as IEnumerable<EntityType>;
}
Run Code Online (Sandbox Code Playgroud) 允许使用网址中的"&"字符吗?如果url是非法的并且存在,对url有什么影响.我正在寻找SEO观点的答案.
例:
rootdomain.com/Black&Decker/products
我有一个表(Some_Table)有两列:
AB
-------------------
1 test
2 test
3 test1
4 test1
我想返回B列的DISTINCT值,它是A列中的相关值(第一个是不同的集合),所以像这样:
AB
-----------
1测试
3 test1
什么是sql?