Auto Generation of Interface Proxies?
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 18.4k
- Forks
- 3.7k
- Avg merge
- 5h 8m
- Merged PRs (30d)
- 1
Description
AutoMapper has a wonderfully useful feature where it can auto-generate a "proxy" class for an interface - allowing you to specify a mapping to an IFoo. AutoMapper generates the proxy on the fly and reuses it on future calls.
Any chance Dapper could be enhanced to do the same thing? I have a zillion private concrete classes implementing my DTO public interfaces, and the only reason those exist is to make Dapper happy - my repositories expose only public interfaces, and it would be a beautiful thing if I could
return await _dbConn.QueryAsync<IFoo>(query, new {fooId});
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 names no files, tests, or entry points to inspect. Start by locating Dapper's query materialization path, then define and verify the behavior needed for QueryAsync: generate a proxy for the interface and reuse it on later calls.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend, database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100