Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wayfair-incubator/gossip
Extends the functionality of Dapper and allows performing database queries in .NET easily and quickly.
https://github.com/wayfair-incubator/gossip
dapper database fluent hacktoberfest sql
Last synced: about 5 hours ago
JSON representation
Extends the functionality of Dapper and allows performing database queries in .NET easily and quickly.
- Host: GitHub
- URL: https://github.com/wayfair-incubator/gossip
- Owner: wayfair-incubator
- License: apache-2.0
- Created: 2021-11-29T16:05:16.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-24T11:55:40.000Z (14 days ago)
- Last Synced: 2024-10-25T11:34:59.492Z (13 days ago)
- Topics: dapper, database, fluent, hacktoberfest, sql
- Language: C#
- Homepage: https://wayfair-incubator.github.io/Gossip/
- Size: 634 KB
- Stars: 1
- Watchers: 2
- Forks: 4
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Gossip
[![Gossip Version](https://img.shields.io/nuget/v/Gossip?label=Latest%20Release)](https://github.com/wayfair-incubator/Gossip/blob/main/CHANGELOG.md)
[![OSS Template Version](https://img.shields.io/badge/OSS%20Template-0.3.5-7f187f.svg)](https://github.com/wayfair-incubator/oss-template/blob/main/CHANGELOG.md)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg)](CODE_OF_CONDUCT.md)## About The Project
Gossip extends the functionality of [Dapper](https://dapper-tutorial.net/) and allows you to perform database queries in
.NET quickly and easily, working with your relational database system of choice (MSSQL, MySQL, PostgreSQL, SQLite,
Oracle, etc). The package is designed for ease of working with single or batched queries, bulk inserts, and
transactions. Want to go deeper? Gossip also supports custom plugins and execution strategies to handle events just the
way you want them.## Installation
Install the latest version from NuGet.
```sh
// NuGet package manager console
Install-Package Gossip
```## Usage
To get started, configure and build a database connection. `Database` offers a number of build options, including adding
plugins and/or execution strategies if desired.```csharp
var _dbConnectionProvider = Database
.Configure()
.WithCommandTimeout(gossipConfiguration.DefaultSqlCommandTimeout)
.WithConnectionString(() => {
return new ConnectionString {
Value = connectionString,
Server = server,
Database = database,
};
})
.Build();
```Open an asynchronous connection.
```csharp
using (var conn = await _provider.OpenAsync(cancellationToken)) {
var results = await conn.QueryAsync(sql);
}
```For simple queries, take advantage of some of the quick and easy methods outlined below.
```csharp
await conn.QueryAsync(sql);
await conn.QueryAsync(sql, params);
await conn.QueryFirstOrDefaultAsync(sql);
await conn.QueryFirstOrDefaultAsync(sql, params);
await conn.QuerySingleOrDefaultAsync(sql);
await conn.QuerySingleOrDefaultAsync(sql, params);
await conn.ExecuteAsync(sql, params);
```For more detailed examples, consult the documentation.
## Roadmap
See the [open issues](https://github.com/wayfair-incubator/Gossip/issues) for a list of proposed features (and known issues).
## Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any
contributions you make are **greatly appreciated**. For detailed contributing guidelines, please see
[CONTRIBUTING.md](CONTRIBUTING.md)## License
Distributed under the `Apache 2.0` License. See `LICENSE` for more information.