dimanche 31 juillet 2016

Create Expression from string params[]

I have a function that want in input an expression of object.

ColumnsToUpdate<T>(params Expression<Func<T, object>>[] properties)    
Update(books, b => b.ColumnsToUpdate(b => b.Author, b => b.Name));

But I have a list of strings

string properties = "Author,Name";

And I want convert it in one compatible expression for use with the ColumnsToUpdate method.





Aucun commentaire:

Enregistrer un commentaire