Do we plan to support the gerenate the SQL text per the Domain object?
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 18.4k
- Forks
- 3.7k
- Avg merge
- 5h 8m
- Merged PRs (30d)
- 1
Description
Sometimes the sql string is very simple, but wast time. For example:
public class Customer
{
public int Id { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
}
We have the model and match to a datatable, if we can use the way to get the result that will be awesome.
connection.Query<Customer>();
The SQL text can be gerenated by some strategies.
SELECT
id AS Id,
first_name AS FirstName,
last_name AS LastName
FROM
tbl_customer
We can defined many different strategies to covner the Domain object to our expected string:
- AddPrefixStrategy: add the prefix text to the table or column name
- AddSuffixStrategy: add the suffix text to the table or column name
- RemoveSuffixStrategy: remove the suffix text of the table or column name
- RemovePrefixStrategy: remove the prefix text of the table or column name
- ToUpperStrategy: upper the text of the table or column name
- ToLowerStrategy: lower the text of the table or column name
- ToCamelStrategy: camel the text of the table or column name
- WordBetweenUnderscoreStrategy: add underscope text of the between word for the table or column name
- CompositeStrategy: the composite for the above strategies.
The expected steps:

I saw the Dapper.Conrib provide some simple cases, do we have plan to include this feature in the future? Thanks.
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 reviewing the described connection.Query() usage and the simple cases in Dapper.Contrib. Clarify whether the request is for automatic SQL generation, naming strategies, or both, and define the expected API and generated SQL before implementation. Done requires an agreed strategy model and concrete behavior for the listed naming transformations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, sql
- Domain
- backend-api-design, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 18/100