{"id":15036043,"url":"https://github.com/pokkeyuri/simplesequel","last_synced_at":"2026-04-06T06:02:27.397Z","repository":{"id":221909077,"uuid":"755753618","full_name":"PokkeYuri/SimpleSequel","owner":"PokkeYuri","description":"SQL statements with minimal boilerplate code","archived":false,"fork":false,"pushed_at":"2024-03-03T19:30:43.000Z","size":35,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-13T12:14:54.154Z","etag":null,"topics":["ado-net","csharp","csharp-library","database-library","dotnet","dotnet8","sql","sql-library"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PokkeYuri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-11T00:00:10.000Z","updated_at":"2024-03-06T21:37:23.000Z","dependencies_parsed_at":"2024-02-22T22:22:53.024Z","dependency_job_id":"31150440-9e1c-4f10-b8f5-2c571261d357","html_url":"https://github.com/PokkeYuri/SimpleSequel","commit_stats":null,"previous_names":["pokkeyuri/simplesequel"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PokkeYuri%2FSimpleSequel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PokkeYuri%2FSimpleSequel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PokkeYuri%2FSimpleSequel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PokkeYuri%2FSimpleSequel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PokkeYuri","download_url":"https://codeload.github.com/PokkeYuri/SimpleSequel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243401509,"owners_count":20285058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ado-net","csharp","csharp-library","database-library","dotnet","dotnet8","sql","sql-library"],"created_at":"2024-09-24T20:29:59.102Z","updated_at":"2025-12-29T06:40:35.367Z","avatar_url":"https://github.com/PokkeYuri.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca\u003e\n    \u003cpicture\u003e\n      \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/PokkeYuri/SimpleSequel/assets/86960788/21096292-0d1c-4217-bce9-cb653fff301e\"\u003e\n      \u003cimg src=\"https://github.com/PokkeYuri/SimpleSequel/assets/86960788/21096292-0d1c-4217-bce9-cb653fff301e\" height=\"128\"\u003e\n    \u003c/picture\u003e\n  \u003ch1 align=\"center\"\u003eSimple Sequel\u003c/h1\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\nSimpleSequel is a lightweight .NET library designed to simplify interaction with databases. It provides intuitive extensions for executing SQL commands and queries and is built on top of ADO.NET.\n\nThis library requires .NET 8.\n\n## Features\n\n- Fetch and execute from the database with minimal boilerplate code.\n- Execute SQL statements directly from string objects.\n- Easily convert database rows into .NET objects or specific classes.\n- Automatically handles the opening and closing of your database connection as necessary.\n\n\u003c!--- \n## Installation\n\nTo use SimpleSequel in your project, install it via NuGet:\n\n```bash\nInstall-Package SimpleSequel\n```\n--\u003e\n\n## Usage\n\nBefore using SimpleSequel in your project, ensure you have a database that is compatible with ADO.NET, as the library utilizes `System.Data.Common.DbConnection` class from the ADO.NET framework for database connections. This step is essential for setting up the library to work seamlessly with your database management system (DBMS).\n\n```csharp\nusing SimpleSequel;\n\n// Initialize SimpleSequel with your DBMS connection\nSimpleSequelManager.Initialize(DbConnection.Connection);\n```\nBelow are some examples of how to use SimpleSequel extensions in your .NET applications.\nFor more usage and examples please refer to the tests included in the 'SqlExtensionsTests' project within this repository.\n\n### Executing a SQL statement\n```cs\n// Execute a statement\n\"INSERT INTO KeyValueTable VALUES ( 'Gandalf', 'Wizard' )\".ExecuteStatement();\n\n// Execute a statement async\nawait \"INSERT INTO KeyValueTable VALUES ( 'Gandalf', 'Wizard' )\".ExecuteStatementAsync();\n```\n\n### Execute and getting a custom value\n```cs\n// Execute a command and get a scalar value\nvar value = \"SELECT Value FROM KeyValueTable WHERE Key = 'Gandalf'\".ExecuteScalar\u003cint\u003e();\n\n// Execute a command asynchronously and get a scalar value\nvar valueAsync = await \"SELECT Value FROM KeyValueTable WHERE Key = 'Gandalf'\".ExecuteScalarAsync\u003cint\u003e();\n```\n\n### Executing for SQL query\n```cs\n// Execute a query and get a DbDataReader\nDbDataReader reader = \"SELECT * FROM KeyValueTable\".ExecuteReader();\n\n// Execute a query asynchronously and get a DbDataReader\nDbDataReader readerAsync = await \"SELECT * FROM KeyValueTable\".ExecuteReaderAsync();\n```\n\n### Execute and getting an object from custom class\n```cs\nclass KeyValue\n{\n    public string Key { get; set; }\n    public string Value { get; set; }\n}\n\n// Execute and get only first row as custom object\nKeyValue keyValue = \"SELECT * FROM KeyValueTable ORDER BY Key\".ExecuteClass\u003cKeyValue\u003e();\n```\n\n## Todo's\n\n- Add XML documentation comments\n- Complete support for both synchronous and asynchronous operations\n- Implement logging\n- Complete CRUD operations for ORM\n- Implement methods using DbParameters to prevent SQL Injections\n\n## License\n\nThis project is licensed under the MIT License. See the LICENSE file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpokkeyuri%2Fsimplesequel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpokkeyuri%2Fsimplesequel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpokkeyuri%2Fsimplesequel/lists"}