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); }
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 })); } }