FC.Extension.SQL 1.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package FC.Extension.SQL --version 1.0.2                
NuGet\Install-Package FC.Extension.SQL -Version 1.0.2                
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="FC.Extension.SQL" Version="1.0.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FC.Extension.SQL --version 1.0.2                
#r "nuget: FC.Extension.SQL, 1.0.2"                
#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 FC.Extension.SQL as a Cake Addin
#addin nuget:?package=FC.Extension.SQL&version=1.0.2

// Install FC.Extension.SQL as a Cake Tool
#tool nuget:?package=FC.Extension.SQL&version=1.0.2                

FC.Extension.SQL

Version Downloads

Project status: active.

FC.Extension.SQL is a library which adds reduces the coding effort for the development team in terms of handling SQL Basic functionality. You may required literally a single line of code to handle DB Operation.

This library supports

  • SQL Server
  • PostgreSQL
  • MySQL Server
  • SQLite

Download

  • NuGet: Install-Package FC.Extension.SQL

Features

  • Ready to use in the project as an extension
  • CRUD for SQL Server, PostgreSQL, MySQL, SQLite
  • You can pass Fluent Query to execute any Query
  • No Worry about the Language(SQL Server, SQLite/PostgreSQL/MySQL)
  • Uses SQLkata to receive as Fluent Query.
  • Targets .NET Core 3.1+
  • Dependent on RepoDB & SQLkata.

Usage

Quick start

Step 1: Setup the Package
Install-Package FC.Extension.SQL
Step 2:Initial Configuration
using FC.Extension.SQL.Helper;
using FC.Extension.SQL.Engine;
using SqlKata;
..

SQLExtension.SQLConfig = new SQLConfig()
	{
	    Compiler = SQLCompiler.PostgreSQL,
	    ConnectionString = "User Id=FCPos;Password=System@1234;Server=localhost;Port=5432;Database=ExtensionTest;",
	    Trace = null
	};
	
var personFake = new Faker<Person>()
                 .RuleFor(o => o.Name, f => f.Person.FirstName)
                 .RuleFor(o => o.Email, f => f.Person.Email);
var person = personFake.Generate();

Step 3:To Save
person = person.Save().Result;
console.Output.WriteLine($"Saved Object : {person.ToJSON<Person>()}");

Step 4:To Update
person.Id = GetIdEntry();
person = person.Update().Result;
console.Output.WriteLine($"Object Updated : {person.ToJSON<Person>()}");

Step 5:To Delete
person.Id = GetIdEntry();
int records = 	person.Delete(person.Id).Result;
console.Output.WriteLine($"Deleted. No of Records : {records}");

Step 6:To Get Object by Id
person.Id = GetIdEntry();
Person per = person.Get(person.Id).Result;
console.Output.WriteLine($"Received Object : {per.ToJSON()}");

Step 7:To Get Object by Query
int id = GetIdEntry();
var personList = person.GetAny(new Query("Person").Where("Id", id)).Result;

foreach (var model in personList)
{
    console.Output.WriteLine($"Queried Object : {model.ToJSON()}");
}

Step 8:To Get Record Count
var personCount = person.GetCount().Result;
console.Output.WriteLine($"Total Records : {personCount}");

⚠️ All Set. Use the same method for other extension methods. The full featured document available in the Gitbook,

Other Extension

Complete

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on FC.Extension.SQL:

Package Downloads
FC.Extension.HTTP

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.1.3.2 495 4/25/2022
2.1.3.1 527 4/25/2022
2.1.3 426 4/25/2022
2.1.2 419 4/25/2022
2.1.1.1 522 4/25/2022
2.1.1 510 4/25/2022
2.1.0 433 4/25/2022
2.0.2.1 527 4/25/2022
2.0.2 424 4/25/2022
2.0.1.1 421 4/25/2022
2.0.1 430 4/25/2022
2.0.0.2 430 3/15/2022
2.0.0.1 2,199 3/14/2022
2.0.0 434 3/13/2022
1.0.3.1 367 10/19/2021
1.0.3 425 10/5/2021
1.0.2 493 9/26/2021
1.0.1 786 9/2/2021
1.0.0.5 424 10/19/2021
1.0.0 392 7/26/2021