vendredi 25 septembre 2015

How add/update data in db with reflection

I would like to save/update my changes in db with reflection. I just have name of a table and the id pk of the field. I try to update this table with reflection...

 var table =(IQueryable)dbContext.ctx.GetType().GetProperty(tableName).GetValue(dbContext.ctx, null);

First I have the table and with the Iqueryable I don't know how I can update my table in db.

Any help?

Thx





Aucun commentaire:

Enregistrer un commentaire