public IEnumerable <DimProduct> GetProducts() { var ent = new AdventureWorksDW2008R2Entities(); return(ent.DimProducts.ToList()); }
public DimProduct GetProduct(int productKey) { var ent = new AdventureWorksDW2008R2Entities(); return(ent.DimProducts.Where(x => x.ProductKey == productKey).FirstOrDefault()); }
public OAService() { entities = new AdventureWorksDW2008R2Entities(); entities.Configuration.LazyLoadingEnabled = false; entities.Configuration.ProxyCreationEnabled = false; }