Ejemplo n.º 1
0
        public ActionResult AddProduct()
        {
            var p = new ElasticSearchProduct
            {
                Id = Guid.NewGuid(),
                Format = "E-book"
            };
            this.Search.IndexProduct( p );

            this.TempData.Add( "Post", "Product added." );
            return Redirect( "index" );
        }
Ejemplo n.º 2
0
 public void IndexProduct( ElasticSearchProduct p )
 {
     this.ElasticSearch.Map<ElasticSearchProduct>();
     this.ElasticSearch.Index<ElasticSearchProduct>( p );
 }