示例#1
0
        public HttpResponseMessage GetAll()
        {
            var items = c.GetAll();

            if (items.Count() == 0)
            {
                //Construyendo respuesta del servidor
                return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "No hay registros de Productos"));
            }
            return(Request.CreateResponse(HttpStatusCode.OK, items));
        }