c# - Linq Insert with string variable column name -


i want pass column name , value function update table using linq.

i have code below don't know how implement string variable column name

private static void update(string key, string value)     {         accesstoken accesstoken = new accesstoken();          accesstoken.<key variable should go here> = value;          qbaccesstokensdatacontext db = new qbaccesstokensdatacontext();         db.accesstokens.insertonsubmit(accesstoken);         db.submitchanges();      } 

add 1 more property class accesstoken key name , store value


Comments

Popular posts from this blog

service - Android MediaPlayer calls onCompletion before it already finished -

javascript - Training Neural Network to play flappy bird with genetic algorithm - Why can't it learn? -

javascript - Create a stacked percentage column -