markrendle / Simple.Data

A light-weight, dynamic data access component for C# 4.0
MIT License
1.33k stars 303 forks source link

UpsertBy not inserting all data #236

Closed JamesKyburz closed 11 years ago

JamesKyburz commented 11 years ago

When using UpsertBy the criteria keys are removed from the data when inserting.

Example

db.Staff.UpsertByUserId(UserId: 12, Email: "foo@foo.foo");

Insers a staff record with UserId null, this is because UserId is removed by :-

https://github.com/markrendle/Simple.Data/blob/master/Simple.Data/Commands/UpsertByCommand.cs#L65

markrendle commented 11 years ago

Closed thanks to pull request. Ta.