Devart.Data.Snowflake.EFCore 1.0.268.11

Prefix Reserved
dotnet add package Devart.Data.Snowflake.EFCore --version 1.0.268.11
                    
NuGet\Install-Package Devart.Data.Snowflake.EFCore -Version 1.0.268.11
                    
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="Devart.Data.Snowflake.EFCore" Version="1.0.268.11" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Devart.Data.Snowflake.EFCore" Version="1.0.268.11" />
                    
Directory.Packages.props
<PackageReference Include="Devart.Data.Snowflake.EFCore" />
                    
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 Devart.Data.Snowflake.EFCore --version 1.0.268.11
                    
#r "nuget: Devart.Data.Snowflake.EFCore, 1.0.268.11"
                    
#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.
#:package Devart.Data.Snowflake.EFCore@1.0.268.11
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Devart.Data.Snowflake.EFCore&version=1.0.268.11
                    
Install as a Cake Addin
#tool nuget:?package=Devart.Data.Snowflake.EFCore&version=1.0.268.11
                    
Install as a Cake Tool

dotConnect for Snowflake

dotConnect for Snowflake is an ADO.NET provider for working with Snowflake data through the standard ADO.NET or Entity Framework Core interfaces. It allows you to easily integrate Snowflake data into your .NET applications, and integrate Snowflake with widely used data-oriented technologies.

The product is compatible with Entity Framework (EF) Core. LINQ queries are translated to Snowflake SQL; SaveChanges (integer keys from sequences), Code-First migrations and scaffolding of an existing schema are supported.

It has the same standard ADO.NET classes as other standard ADO.NET providers: SnowflakeConnection, SnowflakeCommand, SnowflakeDataAdapter, SnowflakeDataReader, SnowflakeParameter, etc. This allows you quickly get started with it and eliminates the need to study any Snowflake API specificities.

More information at dotConnect for Snowflake.

Compatibility


The following table shows which version of this package to use with which version of frameworks.

Frameworks Version support
Entity Framework Core 11
.NET 11

More information here

Installation


For projects, using Entity Framework Core 11 with Snowflake, install this package. Execute the following command in the Package Manager Console:

Install-Package Devart.Data.Snowflake.EFCore

License

See pricing options for ordering.

The NuGet package initiates the retrieval of an activation key from the Devart website. This key is required to activate the product for a free trial.

Usage


This snippet directly configures a SnowflakeConnection class for an Entity Framework Core DbContext using a connection string.

using Microsoft.EntityFrameworkCore;

public class MyDbContext : DbContext {

  protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) {

     optionsBuilder.UseSnowflake(@"Authentication Type=Basic;Domain=myaccount.snowflakecomputing.com;User=myuser;Password=**********;Database=MYDB;Schema=PUBLIC;Warehouse=MYWH;");
  }
}

Configuration Using SnowflakeConnection Instance

using Microsoft.EntityFrameworkCore;
using Devart.Data.Snowflake;
...

public class MyDbContext : DbContext {

  protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) {

     var builder = new SnowflakeConnectionStringBuilder();
     builder.AuthenticationType = SnowflakeAuthenticationType.Basic;
     builder.Domain = "myaccount.snowflakecomputing.com";
     builder.User = "myuser";
     builder.Password = "**********";
     builder.Database = "MYDB";
     builder.Schema = "PUBLIC";
     builder.Warehouse = "MYWH";
     optionsBuilder.UseSnowflake(new SnowflakeConnection(builder.ConnectionString));
  }
}
ASP.NET Core and Blazor

Configuration File (appsettings.json):

{
  "ConnectionStrings": {
    "DefaultConnection": "Authentication Type=Basic;Domain=myaccount.snowflakecomputing.com;User=myuser;Password=**********;Database=MYDB;Schema=PUBLIC;Warehouse=MYWH;"
   }
}

DbContext Configuration:

using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;

public class MyDbContext : DbContext {

  protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) {

    IConfigurationBuilder builder = new ConfigurationBuilder().AddJsonFile("appsettings.json");
    IConfiguration configuration = builder.Build();
    optionsBuilder.UseSnowflake(configuration.GetConnectionString("DefaultConnection"));
  }
}
Generated keys

Snowflake has no RETURNING and cannot return a key it generated, so integer keys get their values before the INSERT:

  • By default, an integer key takes its values from a sequence of its own, <table>_SEQ (Code-First creates it and sets the column DEFAULT "<table>_SEQ".NEXTVAL). EF Core runs SELECT "<table>_SEQ".NEXTVAL when an entity is added: one round trip per added entity, which is noticeable when many entities are added at once. A table of a TPC hierarchy shares the sequence of the hierarchy; a sequence starts after the highest key seeded with HasData. Sequences are created with ORDER, so their values increase.
  • UseHiLo() takes the values in blocks: one NEXTVAL of a sequence that increments by the block size (10 by default, HasSequence(...).IncrementsBy(n) changes it) gives the keys of a whole block. Call it for the whole model or for one property:
protected override void OnModelCreating(ModelBuilder modelBuilder) {

  modelBuilder.UseHiLo();                                              // EntityFrameworkHiLoSequence, blocks of 10
  modelBuilder.HasSequence("OrderIds").IncrementsBy(100);
  modelBuilder.Entity<Order>().Property(o => o.Id).UseHiLo("OrderIds");  // blocks of 100
}

The keys of a block are not consecutive with the keys of other contexts, and a block that is not used up leaves a gap.

  • Guid keys are generated on the client.

Foreign keys are created without ON DELETE / ON UPDATE (Snowflake does not enforce foreign keys and silently creates no constraint with these clauses): cascade deletes happen in the change tracker only. Math.Round of a double rounds a midpoint to even as .NET does; Snowflake has a rounding mode only for NUMBER (decimal). A double is rounded on the server as Math.Round(double, int) of .NET 10 and earlier rounds it: the value scaled by 10^digits is rounded. .NET 11 rounds the exact binary value instead, so a value whose scaled form becomes a midpoint only in binary arithmetic can differ in the last digit: Math.Round(x + 1.175, 2) with x = 1.5 is 2.68 in a query and 2.67 in .NET 11 code.

Limitations
  • Idempotent migration scripts are not generated.
  • INTERSECT ALL and EXCEPT ALL are not supported.
  • Sequences have no MINVALUE, MAXVALUE and CYCLE; a sequence cannot be restarted, so a higher start value advances it and a lower one leaves it as it is.
  • ALTER COLUMN of a computed column is not supported: drop and add the column.
  • By default, EnsureDeleted drops only the tables and sequences of the model and never drops the database.

Key Features

  • Easy Connection: Allows your .NET application to work with Snowflake data using a user name and password or a programmatic access token (PAT), an RSA key pair, or OAuth 2.0, including interactive sign-in in the browser.
  • SQL Translation: LINQ queries are translated to Snowflake SQL and executed by Snowflake.
  • Code-First and Scaffolding: Create tables from your model, or generate a model from an existing schema.
  • Entity Developer: Design Entity Framework Core models for Snowflake visually with Entity Developer.
  • Support and Updates: Enjoy dedicated support team for prompt issue resolution and regular updates to keep your software running smoothly and securely.

Support Area

More Resources

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
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
1.0.268.11 0 12/4/2026
1.0.268.10 0 12/4/2026
1.0.268.9 0 12/4/2026
1.0.268.8 0 12/4/2026
1.0.268 0 12/4/2026