I need to dynamically get an entity object value from string. something like this :
string s = "UserMaster";
string param = "MyUser";
object o = database.s.Find(param);
//I need o to become like object o = db.UserMaster.Find(MyUser);
Sorry I don't know the name if there's already a function to do this. Thank you for your guidance :)
Edited : Ok so here is the bigger picture :
string myString = "Hi my name is [UserMaster.Name] and my school is [SchoolMaster.SchoolName]";
Let's say I got string "[UserMaster.Name]" & "[SchoolMaster.SchoolName]", UserMaster and SchoolMaster is an entity name. UserMaster has 'Name' property and SchoolMaster has 'SchoolName' property. I need to transform "[UserMaster.Name]" to its value, let's say "MyName" and "SchoolMaster.SchoolName" to "MySchoolName".