public HttpResponseMessage GetSupplierById(int id) { try { SupplierModel supplier = SupplierDal.GetSupplierById(id); return(Request.CreateResponse(HttpStatusCode.OK, supplier)); } catch (Exception ex) { return(Request.CreateResponse(HttpStatusCode.BadRequest)); } }
public Supplier GetSupplierById(string code) { return(_supplier.GetSupplierById(code)); }