예제 #1
0
        public object Put([FromBody] Category category, int id)
        {
            ElasticClient es       = conn.Update(indexName);
            var           response = esrepo.UpdateDocument(id, es, category, indexName);

            return(response);
        }
예제 #2
0
        //GET api/values
        //public IEnumerable<Products> Get()
        //{
        //    ElasticClient es = conn.Update(indexName);
        //  var res = esrepo.GetDocument<Products>(es, product);
        //    foreach(var list in res)
        //    {

        //    }
        //    return rep;
        //}

        // GET api/values/5


        public object Get(int id)
        {
            ElasticClient es = conn.Update(indexName);

            return(esrepo.GetDocumentById(es, id, product));
        }