SQLKata.EntityKata 1.0.2-alpha

This is a prerelease version of SQLKata.EntityKata.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package SQLKata.EntityKata --version 1.0.2-alpha
                    
NuGet\Install-Package SQLKata.EntityKata -Version 1.0.2-alpha
                    
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="SQLKata.EntityKata" Version="1.0.2-alpha" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SQLKata.EntityKata" Version="1.0.2-alpha" />
                    
Directory.Packages.props
<PackageReference Include="SQLKata.EntityKata" />
                    
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 SQLKata.EntityKata --version 1.0.2-alpha
                    
#r "nuget: SQLKata.EntityKata, 1.0.2-alpha"
                    
#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 SQLKata.EntityKata@1.0.2-alpha
                    
#: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=SQLKata.EntityKata&version=1.0.2-alpha&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=SQLKata.EntityKata&version=1.0.2-alpha&prerelease
                    
Install as a Cake Tool

SQLKata.EntityKata

Entity Modeler using SQLKata

The idea is to focus the code using only entities names instead of SQL queries to model the data. The library is based on SQLKata and does all the translations under the hood.

Example of an entity with different columns name on db If a property doesn't have the field attribute it will be skipped.

This is the first release for optimization and testing. More methods (and examples) will be added in the future.

Using entity Person that represents a record in table People

[Table("People")]
public class Person
{
    
    [Field("Person_ID")]
    [Identity]
    public int? PersonId { get; set; }
    
    [Field("Person_Name")]
    [Identity]
    public string? PersonName { get; set; }
    
    [Field("Person_Surname")]
    [Identity]
    public string? Surname { get; set; }
        
}

var manager = new EntityKataManager(connectionString);

var people = manager.Query<Person>()
     .Where(new {Name = "Gianpiero"})
     .OrderByDesc(nameof(Person.Surname))
     .Get();
     
foreach (person in people) 
{
    Console.WriteLine($"{person.Name} {person.Surname}");
}
     
int numberOfdeletedRows = manager.Query<Person>().Where(new { Surname = "Smith"}).Delete();
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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.  net9.0 was computed.  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.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.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
1.1.1-alpha 197 7/24/2022
1.1.0-alpha 169 7/23/2022
1.0.7-alpha 163 7/23/2022
1.0.6-alpha 162 7/23/2022
1.0.5-alpha 161 7/19/2022
1.0.4-alpha 159 7/19/2022
1.0.3-alpha 162 7/19/2022
1.0.2-alpha 147 7/19/2022
1.0.1-alpha 144 7/19/2022
1.0.0-alpha 155 7/18/2022