Ignore some properties
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 18.4k
- Forks
- 3.7k
- Avg merge
- 5h 8m
- Merged PRs (30d)
- 1
Description
Hello,
I have a issue with dapper, i'm trying to call a SP
await connection.ExecuteAsync("[ApiInsertDocumentHeader]",
documents, commandType: CommandType.StoredProcedure);
the documents is a array of Document class:
public class Document
{
public int Id { get; set; }
......
[NotMapped]
public AddressStruct Address { get; set; }
}
The SP parameters contains all the Document properties, except the Address.
I'm getting this error:
The member Address of type AddressStruct cannot be used as a parameter value
How can i tell dapper to ignore the Address property?
I'm using dapper 1.50.5, dotnet core 2.1 and SQL Server
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 at the ExecuteAsync parameter handling described in the issue and trace how the Document properties are converted for the stored procedure. The work is done when the [NotMapped] Address property is ignored and the procedure can execute without the unsupported AddressStruct error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, sql
- Domain
- backend, database
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100