Added Column Attribute by Tiefseetauchner · Pull Request #126 · DapperLib/Dapper.Contrib · GitHub
Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Dapper.sln
12 changes: 12 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,18 @@ Dapper.Contrib makes use of some optional attributes:
```
* `[Write(true/false)]` - this property is (not) writeable
* `[Computed]` - this property is computed and should not be part of updates
* `[Column("Columnname")]` - this property has a different name in the Database
* Property is called EmployeeId but Column in DB is called employee_id

```csharp
public class Employee
{
[ExplicitKey]
[Column("employee_id")]
public Guid EmployeeId { get; set; }
public string Name { get; set; }
}
```

Limitations and caveats
-------
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Note: to get the latest pre-release build, add ` -Pre` to the end of the command

### Unreleased

(note: new PRs will not be merged until they add release note wording here)
* Added Column Attribute for different column name to property name

### Previous Releases

Expand Down
7 changes: 6 additions & 1 deletion src/Dapper.Contrib/Dapper.Contrib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
<TargetFrameworks>net461;netstandard2.0;net5.0</TargetFrameworks>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<NoWarn>$(NoWarn);CA1050</NoWarn>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageId>Dapper.Contrib.WithColumn</PackageId>
<PackageVersion>1.0.3</PackageVersion>
<PackageProjectUrl>https://github.com/Tiefseetauchner/Dapper.Contrib</PackageProjectUrl>
<RepositoryUrl>https://github.com/Tiefseetauchner/Dapper.Contrib</RepositoryUrl>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Dapper" Version="2.0.78" />
Expand All @@ -19,4 +24,4 @@
<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
</Project>
</Project>
74 changes: 66 additions & 8 deletions src/Dapper.Contrib/SqlMapperExtensions.Async.cs
Loading