-
Notifications
You must be signed in to change notification settings - Fork 420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Helper method to only update some field values #40
Comments
I don't tried it, for my opinion the idea is very useful. |
I suggest using either of these in your POCO model on the properties you want to exclude. Documentation on this below: |
Using the attributes is only useful if you always want to exclude the same fields. If you have a more dynamic environment where the fields to exclude/include can vary, this helper handles that (for example, you have a file upload table and you want to be able to change the filename without also having to fetch and re-post the possibly large file data, but you also want to be able to upload new data in a separate action). |
Hi @peter3 - great method. 👍 It's been very handy. I've got a small bug with it though. In SQL Server, if the table name being updated is named using a reserved word (e.g. EDIT: I've tested and the following line should be changed to:
|
Useful method for only update some field values Usage sample? Any more alternatives? do you use yet in production? |
i would have used Ormlite, but it isnt free. and is it also supports only .net 4.5 upwards. the project i am working on is currently .net 4.0 only |
I've written an extension that allows me to update only specific fields. If you want to use it, be my guest.
The text was updated successfully, but these errors were encountered: