public IQueryable <BL.DomainModel.Supplier> GetAll() { var suppliers = from c in this.db.SupplierSet.AsEnumerable() select SupplierAdapter.AdaptSupplier(c); return(suppliers.AsQueryable()); }
public IQueryable <BL.DomainModel.Supplier> GetAll() { var suppliers = from p in this.db.Suppliers select SupplierAdapter.AdaptSupplier(p); return(suppliers); }
public Supplier GetSupplierById(int supplierId) { var suppliers = from s in this.db.Suppliers.AsEnumerable() where s.SupplierId == supplierId select SupplierAdapter.AdaptSupplier(s); return(suppliers.Single()); }
public IQueryable <Supplier> GetSuppliersByProductId(int id) { var suppliers = from sc in this.db.SupplierConditions.AsEnumerable() where sc.ProductId == id join s in this.db.Suppliers on sc.SupplierId equals s.SupplierId select SupplierAdapter.AdaptSupplier(s); return(suppliers.AsQueryable()); }
public IQueryable <Supplier> GetAllSuppliers() { var suppliers = from s in this.db.Suppliers.AsEnumerable() select SupplierAdapter.AdaptSupplier(s); var queryable = suppliers.AsQueryable(); return(queryable); }
public BL.DomainModel.Supplier GetById(int id) { try { var suppliers = from c in this.db.SupplierSet.AsEnumerable() where c.SupplierId == id select SupplierAdapter.AdaptSupplier(c); return(suppliers.First()); } catch (ArgumentNullException ex) { if (ExceptionPolicy.HandleException(ex, "DA Policy")) { throw; } return(new MissingSupplier()); } }