Example #1
0
        public HttpResponseMessage ListOfSellers()
        {
            SellerRepository _repo = new SellerRepository();

            try
            {
                IEnumerable <Seller> list = _repo.ListOfSellers();
                return(Request.CreateResponse(HttpStatusCode.OK, list));
            }
            catch (Exception ex)
            {
                return(Request.CreateResponse(HttpStatusCode.BadRequest));
                //return StatusCode(HttpStatusCode.BadRequest);
            }
        }