DapperLib / DapperLib/Dapper.Contrib
Dapper.Contrib - suggestion to remove generic type of interface i.e. Insert<T>(T entity) => Insert(object o)
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 293
- Forks
- 109
- PR merge metrics
- No merged PRs in 30d
Description
Is there any specific reason why the Insert/Update/Delete interface must be generically typed?
Using obj.GetType() instead of typeof(T) would mean that consumers would need to necessarily know the type themselves.
E.g it would be nice to be able to do something like this:
`
private List<object> tracked = new List<object>();
foreach (var item in tracked)
{
Sql.Insert(item);
}
`
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
Start by locating the Dapper.Contrib implementations and interfaces for Insert, Update, and Delete, then review their existing call sites and tests. Determine whether accepting object values is compatible with the current API and establish tests showing the intended tracked-list usage; the work is done when the behavior and compatibility decision are covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api, database
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100