日期:2014-05-20 浏览次数:20937 次
public UsersDataContext() : base(ConfigurationManager.ConnectionStrings["DBNameConnectionString"].ConnectionString, mappingSource) { OnCreated(); }
------解决方案--------------------
public class DGService : IDGService { public List <user> GetUsers() { SampleDCDataContext dc = new SampleDCDataContext(); var query = from p in dc.users select new user{ id = p.Id....}; return query.ToList(); } }