c# - How to update a user? -


the goal

update user's table consistently.

the problem

i have edit information of specific user , don't know how.

  • firstly, there's users table on application stores information of user.

  • secondly, can't think in recursive way this. there're multiple columns on users table , don't know how edit columns user requested. any idea?

what want?

i'm not executing query through c#. need database came via stored procedure. (except basics .select(), firstordefault(), etc.). in other words, need 2 things:

  1. a (mysql) recursive query syntax idea;
  2. i need c# method invoke stored procedure this:

user user = new user("chiefmaster@test.com"); // target of update. updateuser     (user.email => "masterchief@test.com", // old "chiefmaster@test.com"      user.nickname => "masterchief" // old "chiefmaster"); 

as can see, i'm updating email , nickname of specific user — should not affect other user's information.

can give me ideas or way follow?

there lots of ways of solving this, have tried? can example use orm, handles you.

you can manually implement dirty flags per property , save changed properties.

or can create method updateuseremailandnickname(user user, string newemail, string newnickname).


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -