0

我想对实体通用请求进行 linq

例如

我有

public Dictionary<string, bool> IsObjectInBase(Type type)
{
    MyEntityContainer context = new EntityContainer();
    Dictionary<string, bool> isObjectInBaseDico = new Dictionary<string, bool>
    List<AnObject> objectList = callingAMethod(type.ToString());

    foreach(AnObject object in objectList)
    {
        List<T> genericObjectList = context.type.ToList();
        if(genericObject.Count > 0)
        {
            isObjectInDataBaseDico.Add(type.ToString(),true);
        }
    }
    return isAnObjectInDataBaseDico;
}

我不能在数据库上下文中使用我的请求的类型参数,有谁知道是否可以对实体请求进行通用 linq?

4

0 回答 0