我创建了一个名为 Repository 的类库,其中包括存储 SQL Server 数据库 ORM 的 LINQ To SQL 文件,此外,我还创建了另一个名为 Services 的类库,它具有 Repository 类库的引用,我想使用 LINQ SQL 文件位于服务的存储库中,但我看不到扩展方法,但我可以在服务中创建 LinqToSQL 的实例。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Repository; // This is the referred class library
namespace Core {
class BugListService {
BBDatabaseDataContext dbContext = new BBDatabaseDataContext();
public int CreateBug(BugList bug) {
dbContext.BugLists. // <= The extension methods don't appear in intellisense
}
}
}