CockroachDB.EFCore.Provider 0.1.0

dotnet add package CockroachDB.EFCore.Provider --version 0.1.0
NuGet\Install-Package CockroachDB.EFCore.Provider -Version 0.1.0
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="CockroachDB.EFCore.Provider" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CockroachDB.EFCore.Provider --version 0.1.0
#r "nuget: CockroachDB.EFCore.Provider, 0.1.0"
#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.
// Install CockroachDB.EFCore.Provider as a Cake Addin
#addin nuget:?package=CockroachDB.EFCore.Provider&version=0.1.0

// Install CockroachDB.EFCore.Provider as a Cake Tool
#tool nuget:?package=CockroachDB.EFCore.Provider&version=0.1.0

CockroachDB extension for Npgsql.EntityFrameworkCore.PostgreSQL

This provider is currently in beta. For a list of known limitations see: https://github.com/cockroachdb/efcore.pg.cockroach/blob/main/docs/known-issues.md

CockroachDB.EFCore.Provider is an extension library to add compatibility for CockroachDB to the open source EF Core provider for PostgreSQL. It allows you to interact with CockroachDB via the most widely-used .NET O/RM from Microsoft, and use familiar LINQ syntax to express queries. It's built on top of Npgsql.EntityFrameworkCore.PostgreSQL.

Here's a quick sample to get you started:

await using var ctx = new BlogContext();
await ctx.Database.EnsureDeletedAsync();
await ctx.Database.EnsureCreatedAsync();

// Insert a Blog
ctx.Blogs.Add(new() { Name = "FooBlog" });
await ctx.SaveChangesAsync();

// Query all blogs who's name starts with F
var fBlogs = await ctx.Blogs.Where(b => b.Name.StartsWith("F")).ToListAsync();

public class BlogContext : DbContext
{
    public DbSet<Blog> Blogs { get; set; }

    protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        => optionsBuilder
            .UseNpgsql(@"Host=myserver;Username=mylogin;Password=mypass;Database=mydatabase")
            .UseCockroach();
}

public class Blog
{
    public int Id { get; set; }
    public string Name { get; set; }
}
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.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
0.1.0 1,840 4/15/2024
0.0.1 101 4/14/2024