1
我有幾個ef實體類(生成數據庫第一)。本人水平有限使用EF 3.5 我需要從倉庫接口返回一個常見的類型 - 試圖使用擴展在部分實體類,但沒有工作的自定義界面 -實體框架實體類返回的可能接口是什麼?
我的一些代碼:
庫接口:
interface IRepository
{
List<string> GetColumnNames();
IQueryable<EntityObject> GetAll();//what common type/interface can I return here?
}
庫類: 我有幾個這些
class CatalogItemRepository:IRepository
{
private string repositoryName="CatalogItem";
public List<string> GetColumnNames()
{
//implementation
}
public IQueryable<CatalogItem> GetAll()
{
//implementation
}
}
實體類