Introducing SQL Helper: A Lightweight Micro-ORM for MS SQL and SQLite Databases
🚀 Simplify Your SQL Database Interactions
Are you looking for a lightweight yet powerful tool to work with MS SQL / SQLite databases? Meet SQL Helper, a Micro-ORM designed for small to medium-scale applications. Unlike Entity Framework, which is feature-rich but can be complex, SQL Helper focuses on efficiency, speed, and simplicity, allowing you to handle database operations with minimal code.
🔥 Key Features
Feature | Description |
---|---|
Effortless Connection Handling | Automatically opens and closes connections, reducing the risk of resource leaks. |
Simple Object Mapping | Map objects directly to database tables without writing complex SQL queries. |
Multi-Database Support | Execute queries across different databases seamlessly. |
Automatic Table Creation | Automatically create tables if they don’t exist when writing data. |
SQL Injection Protection | Built-in security measures to prevent SQL injection. |
Utility Functions | Includes helpers like ClearTable , GetPrimaryKeys , and GetTableSchema . |
🛠 How It Works
Using SQL Helper is simple. Just extend the SqlHelper
class, set up your connection string, and execute queries effortlessly. Here’s an example:
public class MyDatabase : SqlHelper
{
public MyDatabase(string database) : base()
{
string server = "your_server";
base.SetSqlConnection(server, database);
}
}
📌 Read Data Efficiently
Retrieve data from your tables without manually handling connections:
public Employee[] ReadEmployeeData()
{
return ReadFromDatabase<Employee>().ToArray();
}
📝 Write Data with Ease
Save new records to the database with a single line:
public void WriteEmployeeData(Employee[] employees)
{
WriteToDatabase(employees);
}
🎯 Why Choose MS SQL Helper?
✅ Lightweight & Fast – No unnecessary overhead, just the essentials.
✅ Easy to Learn – Minimal setup, simple API.
✅ Safe & Secure – Prevents common database vulnerabilities.
✅ Great for Small to Medium Apps – Ideal for applications that don’t require a full-fledged ORM.
📥 Get Started
MS SQL
🔹 Download MS SQL Helper from NuGet: NuGet Package
🔹 Source Code (MS SQL Helper): MS SQL Source Code
SQLite
🔹 Download MS SQLite Helper from NuGet: NuGet Package
🔹 GitHub Project Page: CodeArtEng.SQLite
💡 Try it today and experience a simpler way to work with SQL databases!
💬 Have Feedback?
We’d love to hear from you! Email us (codearteng@gmail.com) your thoughts, suggestions, or issues. 🚀