コード例 #1
0
        public IEnumerable <DimProduct> GetProducts()
        {
            var ent = new AdventureWorksDW2008R2Entities();

            return(ent.DimProducts.ToList());
        }
コード例 #2
0
        public DimProduct GetProduct(int productKey)
        {
            var ent = new AdventureWorksDW2008R2Entities();

            return(ent.DimProducts.Where(x => x.ProductKey == productKey).FirstOrDefault());
        }
コード例 #3
0
ファイル: OAService.svc.cs プロジェクト: doantranthanh/OBW
 public OAService()
 {
     entities = new AdventureWorksDW2008R2Entities();
     entities.Configuration.LazyLoadingEnabled   = false;
     entities.Configuration.ProxyCreationEnabled = false;
 }