Пример #1
0
        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));
        }
Пример #3
0
        public IEnumerable <SupplierView> GetAll()
        {
            var suppliers = suppliersService.GetAllSuppliers();

            return(mapper.Map <IEnumerable <SupplierDTO>, IEnumerable <SupplierView> >(suppliers));
        }