FC.Extension.SQL 1.0.1

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.1
NuGet\Install-Package FC.Extension.SQL -Version 1.0.1
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.1" />
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.1
#r "nuget: FC.Extension.SQL, 1.0.1"
#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.1

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

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 454 4/25/2022
2.1.3.1 498 4/25/2022
2.1.3 399 4/25/2022
2.1.2 389 4/25/2022
2.1.1.1 491 4/25/2022
2.1.1 480 4/25/2022
2.1.0 403 4/25/2022
2.0.2.1 497 4/25/2022
2.0.2 396 4/25/2022
2.0.1.1 391 4/25/2022
2.0.1 401 4/25/2022
2.0.0.2 397 3/15/2022
2.0.0.1 2,112 3/14/2022
2.0.0 403 3/13/2022
1.0.3.1 338 10/19/2021
1.0.3 396 10/5/2021
1.0.2 467 9/26/2021
1.0.1 737 9/2/2021
1.0.0.5 399 10/19/2021
1.0.0 363 7/26/2021