I want to make a method that will populate the lst_List list with rows from various tables and fields.
Preliminary version of the code:
cntDB = new ContextDB();
List> lst_List = new List>();
public void Method_2(string nameTable, string nameField)
{
var phones = cntDB.Database.ExecuteSqlCommand("SELECT " + nameField + " FROM " + nameTable); // +-
lst_List.AddRange(phones.ToList());
}
How to make the method fill the list with values from different tables and fields in one list?
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)