UEntity.ElasticSeach 7.17.5.3

dotnet add package UEntity.ElasticSeach --version 7.17.5.3
                    
NuGet\Install-Package UEntity.ElasticSeach -Version 7.17.5.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="UEntity.ElasticSeach" Version="7.17.5.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="UEntity.ElasticSeach" Version="7.17.5.3" />
                    
Directory.Packages.props
<PackageReference Include="UEntity.ElasticSeach" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add UEntity.ElasticSeach --version 7.17.5.3
                    
#r "nuget: UEntity.ElasticSeach, 7.17.5.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=UEntity.ElasticSeach&version=7.17.5.3
                    
Install UEntity.ElasticSeach as a Cake Addin
#tool nuget:?package=UEntity.ElasticSeach&version=7.17.5.3
                    
Install UEntity.ElasticSeach as a Cake Tool

UEntity.ElasticSeach NuGet Package

Introduction

The UEntity.ElasticSeach NuGet package provides a flexible and efficient repository pattern implementation for ElasticSeach. This package simplifies common ElasticSeach operations such as querying, inserting, updating, deleting, and pagination.

Getting Started

Installation

Install the package via NuGet:

Install-Package UEntity.ElasticSeach

Configuration

To use the package, configure it in your Program.cs file by calling the AddUEntityElasticSeach extension method.

var elasticsearchUri = "http://localhost:9200";
var settings = new ConnectionSettings(new Uri(elasticsearchUri))
    .DefaultIndex("your_default_index");

var client = new ElasticClient(settings);

var serviceCollection = new ServiceCollection();
serviceCollection.AddUEntityElasticSeach(client);

Usage

public class YourEntity
{
    public string Id { get; set; }
    public string Name { get; set; }
}

var repository = new EntityRepositoryElasticSeach<YourEntity>("your_index_name");

// Adding a single document
await repository.AddAsync(new YourEntity { Id = "1", Name = "Document 1" }, "1");

// Getting a document by ID
var document = await repository.GetAsync("1");

// Updating a document
await repository.UpdateAsync(new YourEntity { Id = "1", Name = "Updated Document" }, "1");

// Deleting a document
await repository.DeleteAsync("1");

// Adding a range of documents
var items = new List<YourEntity>
{
    new YourEntity { Id = "2", Name = "Document 2" },
    new YourEntity { Id = "3", Name = "Document 3" }
};
await repository.AddRangeAsync(items, item => item.Id);
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
7.17.5.3 133 4/9/2025
7.17.5.2 155 4/7/2025
7.17.5.1 143 4/3/2025
7.17.5 151 4/2/2025