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

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -