Example #1
0
        public HttpResponseMessage Get(string id)
        {
            categories entity = new categories();

            entity = entity.Get(id);
            if (entity != null)
            {
                return(Request.CreateResponse(HttpStatusCode.OK, entity));
            }
            else
            {
                return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Entity with ID " + id + " not found."));
            }
        }
Example #2
0
        public IEnumerable <categories> Get()
        {
            categories categories = new categories();

            return(categories.Get());
        }