Exemple #1
0
        public List <SupplierModel> SuppliersSearch(SupplierSimpleSearchModel sup)
        {
            SupplierSearchModel query = new SupplierSearchModel();

            query.SupplierName    = sup.SupplierName;
            query.SupplierAddress = sup.SupplierAddress;
            var result = _supplierDataAccess.SuppliersSearch(query).Select(x => MapSupplierToSupplierModel(x)).ToList();

            return(result);
        }
Exemple #2
0
        public IHttpActionResult GetSupplierSearch([FromBody] SupplierSimpleSearchModel supplier)
        {
            var container = ContainerConfig.Configure();

            using (var scope = container.BeginLifetimeScope())
            {
                var app = scope.Resolve <ISupplierBusinessLayer>();

                var result = app.SuppliersSearch(supplier);

                return(Json(new { Result = result }));
            }
        }