markrendle / Simple.Data

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

are mismatched cols an issue? #396

Open GusBeare opened 7 years ago

GusBeare commented 7 years ago

I love Simple. Data and I hope it doesn't die.

I am curious about something. I am playing with dynamic objects and not using models.

If I update a table like this:

db.Mytable.UpdateById(formRow);

Sometimes there are items in the data object (formRow) that are missing from the table. Only a couple at the most. I can remove these like this:

formRow.Remove(KeyName);

But is there any point? Simple.Data seems to be able to handle the mismatches.

Is it good practice to remove them? I would assume that I should only ever include cols that are being updated. But is it really necessary?