i have a function
public string getValue(string val)
and in this function i need to get the value from a database field:
using (UsersContext db = new UsersContext())
{
UserProfile user = db.UserProfiles.Where(c => c.UserId == this.userId).FirstOrDefault()
name = user.(val); ????????????
}
How i can get the custom value from the function argument? I think i need to change the argument type:
public string getValue(UserProfile val)
But how i can get the Property or Pass the Property Name?
Thank you!!! :)