DapperLib / DapperLib/Dapper.Contrib
Access to static readonly ConcurrentDictionary in SqlMapperExtensions
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 293
- Forks
- 109
- PR merge metrics
- No merged PRs in 30d
Description
How access to TypeTableName in Dapper.Contrib.Extensions.SqlMapperExtensions class using Reflection?
private static readonly ConcurrentDictionary<RuntimeTypeHandle, string> TypeTableName = new ConcurrentDictionary<RuntimeTypeHandle, string>();
Not cannot set null to SqlMapperExtensions.TableNameMapper because use TypeTableName
https://github.com/StackExchange/Dapper/blob/main/Dapper.Contrib/SqlMapperExtensions.cs#L280
```
Delegate[] delegados = Dapper.Contrib.Extensions.SqlMapperExtensions.TableNameMapper.GetInvocationList();
foreach (TableNameMapperDelegate delegateTableNameMapper in delegados)
Dapper.Contrib.Extensions.SqlMapperExtensions.TableNameMapper -= delegateTableNameMapper;
Delegate.RemoveAll(Dapper.Contrib.Extensions.SqlMapperExtensions.TableNameMapper, Dapper.Contrib.Extensions.SqlMapperExtensions.TableNameMapper);
Dapper.Contrib.Extensions.SqlMapperExtensions.TableNameMapper -= tableNameDelegate;
Dapper.Contrib.Extensions.SqlMapperExtensions.TableNameMapper = null;
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue points to Dapper.Contrib/SqlMapperExtensions.cs, specifically the private TypeTableName field and TableNameMapper usage. Read that file first; the desired change and completion condition are not specified, so clarify whether a public access or reset API, or another behavior, is wanted before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100