public object Put([FromBody] Category category, int id) { ElasticClient es = conn.Update(indexName); var response = esrepo.UpdateDocument(id, es, category, indexName); return(response); }
//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)); }