Add support ColumnAttribute for different column name by denisenko93 · Pull Request #130 · DapperLib/Dapper.Contrib · GitHub
Skip to content

Add support ColumnAttribute for different column name#130

Open
denisenko93 wants to merge 1 commit into
DapperLib:mainfrom
denisenko93:main
Open

Add support ColumnAttribute for different column name#130
denisenko93 wants to merge 1 commit into
DapperLib:mainfrom
denisenko93:main

Conversation

@denisenko93

@denisenko93 denisenko93 commented Mar 1, 2022

Copy link
Copy Markdown

Added Attribute [Column(string)] for when the column in the DB is named differently from the Property in the model. Fixed #129

Breaking changes:

  • In ISqlAdapter changed method AppendColumnNameEqualsValue
  • Tables in database should contains columns for all properties

@JoeBerkley

Copy link
Copy Markdown

@feiazifeiazi

Copy link
Copy Markdown

@denisenko93 I used your branch of the code. Thank you.

@feiazifeiazi

Copy link
Copy Markdown

@denisenko93
This line of code has a bug: "sqlStringBuilder.Remove(sqlStringBuilder.Length - 3, 2);". The code is intended to remove the last comma, which works correctly on the Windows platform. However, on the Linux platform, it removes extra characters, resulting in issues with the SQL statement.

@feiazifeiazi

feiazifeiazi commented Jun 24, 2024

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

need to add Annotation for Column Name

3 participants