Type-safe, attribute-driven Weaviate client for .NET. Define schemas with C# attributes, query with LINQ-style expressions.
| Document | Description |
|---|---|
| Getting Started | 5-minute quickstart |
| Guide | Complete user guide |
| Architecture | System design and decisions |
| API Reference | Complete API surface |
| Document | Description |
|---|---|
| Attributes | All 14 attributes with properties and examples |
| Mapping | Type conversion, vectors, references |
| Migrations | Schema evolution and breaking changes |
| Document | Description |
|---|---|
| Advanced | Multi-tenancy, multi-vector, RAG, ConfigMethod |
| Best Practices | Collection design, performance, testing |
| Dependency Injection | DI patterns for ASP.NET Core |
| Roadmap | Current state and future vision |
dotnet add package Weaviate.Client.Managedusing Weaviate.Client;
using Weaviate.Client.Managed.Attributes;
using Weaviate.Client.Managed.Extensions;
// Define your model
[WeaviateCollection("Articles")]
public class Article
{
[Property]
public string Title { get; set; } = "";
[Property]
public string Content { get; set; } = "";
[Vector<Vectorizer.Text2VecOpenAI>(SourceProperties = [nameof(Title), nameof(Content)])]
public float[]? Embedding { get; set; }
}
// Use it
var client = new WeaviateClient(new WeaviateConfig { Host = "localhost:8080" });
var articles = await client.Collections.CreateManaged<Article>();
await articles.Insert(new Article { Title = "Hello", Content = "World" });
var results = await articles.Query
.NearText("greeting")
.Limit(10)
.Execute();
// Access results
foreach (var result in results)
{
Console.WriteLine($"{result.Object.Title}: Score={result.Metadata?.Score}");
}
// Or extract just objects when metadata not needed
var objects = results.Objects();This library uses "Managed" terminology:
ManagedCollection<T>- Type-safe collection wrapperCreateManaged<T>()- Create a managed collectionUseManaged<T>()- Get existing collection as managed (collection name from attribute)AsManaged<T>()- Wrap existing collection client
Historical note: Earlier development used "CollectionMapper" and "WOMP" terminology.