Skip to content

Ignore some properties #1033

Open
Open
@fredericoregateiro

Description

@fredericoregateiro

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions