public ListResult <object> GetAll() { var result = ListResult <object> .SuccessResult; try { result.data = _suppliersService.GetAllSuppliers(); return(result); } catch (Exception ex) { throw ex; } }
public HttpResponseMessage GetAllSuppliers() { var suppliers = _service.GetAllSuppliers(); return(Request.CreateResponse(HttpStatusCode.OK, suppliers)); }
public IEnumerable <SupplierView> GetAll() { var suppliers = suppliersService.GetAllSuppliers(); return(mapper.Map <IEnumerable <SupplierDTO>, IEnumerable <SupplierView> >(suppliers)); }