public async Task <IIndexResponse> Index(FoodLocationSearchViewModel item) { var model = new FoodLocationSearch { Id = item.Id, Address = item.Address, Note = item.Note, Image = item.Image, Name = item.Name, Tel = item.Tel, Title = item.Title, Location = new GeoLocation(item.Latitude, item.Longitude), Category = item.Category, Tag = " " + item.Name.ToLower() + " " + convertToUnSign3(item.Name.ToLower()) + " " }; return(await _client.IndexAsync <FoodLocationSearch>(model, i => i .Index("location") .Type("foodlocationsearch") .Id(model.Id) .Refresh(Elasticsearch.Net.Refresh.True))); }
public async Task <IDeleteResponse> Delete(FoodLocationSearchViewModel model) { return(await _client.DeleteAsync <FoodLocationSearch>(model.Id, d => d .Index("location") .Type("foodlocationsearch"))); }