Beispiel #1
0
        public IEnumerable <DimProduct> GetProducts()
        {
            var ent = new AdventureWorksDW2008R2Entities();

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

            return(ent.DimProducts.Where(x => x.ProductKey == productKey).FirstOrDefault());
        }
Beispiel #3
0
 public OAService()
 {
     entities = new AdventureWorksDW2008R2Entities();
     entities.Configuration.LazyLoadingEnabled   = false;
     entities.Configuration.ProxyCreationEnabled = false;
 }