ZapLib 2.5.0

dotnet add package ZapLib --version 2.5.0
                    
NuGet\Install-Package ZapLib -Version 2.5.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="ZapLib" Version="2.5.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ZapLib" Version="2.5.0" />
                    
Directory.Packages.props
<PackageReference Include="ZapLib" />
                    
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 ZapLib --version 2.5.0
                    
#r "nuget: ZapLib, 2.5.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.
#:package ZapLib@2.5.0
                    
#: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=ZapLib&version=2.5.0
                    
Install as a Cake Addin
#tool nuget:?package=ZapLib&version=2.5.0
                    
Install as a Cake Tool

ZapLib

NuGet License

Inspired by jQuery and Node.js, ZapLib is a lightweight library for C# that empowers developers to swiftly accomplish intricate tasks. Whether it's performing HTTP requests, executing SQL Server / Oracle queries, extending .NET Web API functions, sending SMTP emails, working with regular expressions, and more, all can be achieved using straightforward code with ZapLib.

📚 Documentation

👉 https://linzap.github.io/ZapLib/

完整使用手冊:教學文件 + 自動產生的 API Reference。

Installation

Package Manager (latest stable)

PM> Install-Package ZapLib

Specific Version

PM> Install-Package ZapLib -Version 2.5.0       # v2 stable (latest)
PM> Install-Package ZapLib -Version 2.4.12      # previous v2 stable
PM> Install-Package ZapLib -Version 1.23.0      # v1 legacy

.NET CLI

dotnet add package ZapLib

System Requirement

ZapLib Version .NET Framework
v2.1.0 4.7.2
v1.23.0 4.7.2
v1.12.0 4.5
v1.10.0 4.0

SignalR Issue

Starting from version v1.16.0, SignalR is included. If you are using ZapLib in a .NET WebAPI project and you are not utilizing SignalR-related features, please add the configuration to your Web.config file:

<appSettings>
    <add key="owin:AutomaticAppStartup" value="false" />
</appSettings>

Quick Start

HTTP Request

using ZapLib;

Fetch f = new Fetch("https://httpbin.org/get");
dynamic result = f.Get<dynamic>(new { name = "ZapLib" });
Console.WriteLine(result.args.name);   // ZapLib

SQL Query

using ZapLib;

SQL db = new SQL("DefaultConn");
dynamic[] rows = db.QuickDynamicQuery("SELECT * FROM Book WHERE id = @id", new { id = 1 });
Console.WriteLine(rows[0].name);

Oracle Query (since v2.5.0)

using ZapLib;

OracleSQL db = new OracleSQL("OracleConn");
HR_Row[] users = db.QuickQuery<HR_Row>(
    "SELECT * FROM HR_VIEW WHERE EMPN = @empn",
    new { empn = "625871" }
);

更多範例請見 完整文件

Feature Highlights

Module Purpose Docs
Fetch HTTP request 封裝(GET/POST/PUT/DELETE/PATCH、JSON、檔案上傳) 📖
SQL SQL Server 連線與查詢、Bulk Copy、Transaction、Stored Procedure 📖
OracleSQL Oracle 資料庫連線(純託管,免安裝 Oracle Client) 📖
ExtApiHelper ASP.NET Web API 2 擴充輔助 📖
ApiControllerSignalR<T> Web API + SignalR 📖
[ValidPlatform] S2S API 平台驗證 📖
Mailer / ImplicitMailer SMTP 寄信(MailKit / 隱式 SSL) 📖
RegExp jQuery 風格的正規表達式 📖
JsonReader / JXPath 安全的深層 JSON 存取 📖
Crypto / MD5 MD5 / DES 加解密、簽章 📖
Config App.config / Web.config 讀寫 📖
MyLog / LogExecTime 檔案日誌、執行時間追蹤 📖
ZipHelper Zip 壓縮 📖
DynamicObject / ClassMirror / DllLoader 執行期建立 / 載入類別 📖

Changelog

請見 CHANGELOG.md 或文件站的 Changelog 頁面

License

ZapLib is released under the MIT License.

Copyright (C) 2018-2026 ZapLin

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Product Compatible and additional computed target framework versions.
.NET Framework net472 is compatible.  net48 was computed.  net481 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
2.5.0 97 5/21/2026
2.5.0-beta1 97 4/24/2026
2.4.13-beta3 310 4/16/2025
2.4.13-beta2 193 11/6/2024
2.4.13-beta 177 11/5/2024
2.4.12 336 11/1/2024
2.4.11 244 10/30/2024
2.4.10 270 10/30/2024
2.4.9 264 10/9/2024
2.4.8 236 7/30/2024
2.4.7 247 7/23/2024
2.4.6 283 4/24/2024
2.4.5 372 10/19/2023
2.4.4 389 8/30/2023
2.4.3 474 3/2/2023
2.4.2 673 10/27/2022
2.4.1 586 10/26/2022
2.4.0 578 10/26/2022
2.3.1 638 8/30/2022
1.23.0 456 3/2/2023
Loading failed

v2.5.0 — Stable release of the 2.5.x line. Includes:
       * NEW OracleSQL class for Oracle database queries (managed driver, no Oracle Client needed)
       * Security: patches CVEs in MailKit, MimeKit, Microsoft.Owin, Newtonsoft.Json
       * Renamed misspelled public methods (Connet -> Connect, BuildconnString -> BuildConnectionString, SetRequestContnet -> SetRequestContent). Old names kept as [Obsolete] aliases for backward compatibility; they will be removed in v3.0.
       * NEW documentation site: https://linzap.github.io/ZapLib/
     v2.4.12 (previous stable) — SQL AlwaysOn read-only routing support
     v1.22.0 (LTS for .NET 4.5)

     Full changelog: https://github.com/LinZap/ZapLib/blob/master/CHANGELOG.md