Example #1
0
        public GetSuppliersResponse GetSuppliersByCriteria(GetSuppliersRequest request)
        {
            GetSuppliersResponse      response = new GetSuppliersResponse();
            SupplierBusinessComponent bc       = DependencyInjectionHelper.GetSupplierBusinessComponent();

            IQueryable <Supplier> suppliers = bc.GetSuppliersByCriteria(request.SearchType, request.Name);

            response.Suppliers = SupplierAdapter.SuppliersToDtos(suppliers);

            return(response);
        }
        public GetSuppliersResponse GetSuppliersByProductId(GetSuppliersRequest request)
        {
            var bc        = DependencyInjectionHelper.GetBusinessComponent <SupplierBusinessComponent>();
            var suppliers = bc.GetSuppliersByProductId(request.ProductId);

            var response = new GetSuppliersResponse();

            response.Suppliers = SupplierAdapter.SuppliersToDtos(suppliers);

            return(response);
        }