zeelyn / dapper.extensions Goto Github PK
View Code? Open in Web Editor NEWA dapper extension library. Support MySql,SQL Server,PostgreSql,Oracle and ODBC.
License: MIT License
A dapper extension library. Support MySql,SQL Server,PostgreSql,Oracle and ODBC.
License: MIT License
sometimes i get this error
"Connect to redis-server(redis:6379 -> Unspecified/redis:6379) timeout, DEBUG: Dns.GetHostEntry(redis)=System.Net.IPHostEntry"
need to use CancellationToken in methods
The MySqlDapper code uses Dapper's QueryMultipleAsync
, which will call DbConnection.ExecuteReaderAsync
. It's a long-standing bug in MySql.Data (bug 70111) that async I/O is not implemented correctly; thus all these methods will actually run synchronously. (See also here and here on Stack Overflow.)
To fix this, you could switch to https://github.com/mysql-net/MySqlConnector, an OSS replacement for MySql.Data that supports true asynchronous I/O; it also has full .NET Standard/.NET Core support.
If you're interested in this, I'd be happy to open a PR.
I'm trying to use this package with ODBC in core .net5.0 to connect to a DB2 database. I'm not sure if this is supported, but it would be awesome if there was an ODBC example in the readme.
Hi, are there any plans to add an invalidate function to remove a cache entry by key?
first of all i set cache prefix then in manual cache invalidation i need to get table name from cache prefix i can do it by set prefix for each query but is there any feature to set or get table name from prefix
somehing like this: https://github.com/VahidN/EFCoreSecondLevelCacheInterceptor#3--setting-up-the-cache-invalidation
Using Dapper Caching for Redis but probably the same for others.
Seemed like it was ignoring the parameters if using DynamicParameters. Returned the same value from cache even though parameters were different.
Looked at source and came up with this c# test.
var sql="some sql;
var p1 = new DynamicParameters();
var p2 = new DynamicParameters();
p1.Add("Test1","test1");
p2.Add("Test1","test2");
var cb = new DefaultCacheKeyBuilder(new CacheConfiguration());
var a = cb.Generate(sql, p1,"");
var b = cb.Generate(sql, p2,"");
Generates the same cache key. Doesn't append the values of the actual parameters. I get this as the string:
RemoveUnused=True&ParameterNames=System.Linq.Enumerable+SelectEnumerableIterator2[System.Collections.Generic.KeyValuePair
2[System.String,Dapper.DynamicParameters+ParamInfo],System.String]&
I uploaded a screen cap from Jetbrains Rider.
I rolled my own that iterates the values of the dynamic parameters to get the actual values.
Dapper.Extensions have many functions
but, i want use simple dapper and cache like
using (var conn = GetDBCnn(connectionDbType, connectionString))
{
var resultAsync = await conn.QueryAsync<T>(
sql,
param: parameters,
enableCache: true,
cacheExpire: TimeSpan.Parse(this.Configuration.GetValue<string>("DapperCachingDuration"))
);
}
please how can i use?
after executing this code sometimes the error thrown
await _connection.QueryAsync<GroupQuery>(sql: query, param: parameters, cacheKey: cacheKey.ToString());
System.Threading.SemaphoreFullException
Adding the specified count to the semaphore would cause it to exceed its maximum count.
Hi,
Wondering if this Dapper extension supports Azure Cosmos DB via the Azure Cosmos DB ODBC driver?
Thx.
hi,does support dynamic connection?
Maybe You will be interested in hosting API online :)
www.robiniadocs.com/d/dapper-extensions-netcore
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.