Skip to content

BulkInsert reset NotMapped Property with SetOutputIdentity = true #76

Closed
@ghost

Description

Hi,

Let me explain with an Example.

class Foo {
public int Id {get; set;}
//other field 

[NotMapper]
public stringNotTouch {get; set;}
}
List<Foo> items; 
//initialize the list

using (var transaction = context.Database.BeginTransaction()) {
//here the field stringNotTouch has value, id is 0
context.BulkInsert(itemList, , new BulkConfig { SetOutputIdentity = true });
//here the field stringNotTouch has _no_ value, but id is valid
 transaction.Commit();
 }

Is it a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions