I try to run LINQ query. As you can see from the code below, I try to name the table ("TableName") before passing it to LINQ, and of course LINQ can't find a table named "TableName". Any other way around how to do this? I tried ctxdata.(TableName) but didn't work.
var TableName = "";
TableName = "DATA_ + DistrictCode;
using (SFTEMPEntities1 ctxdata = new SSFTEMPEntities1())
{
var queryAttributes = (from p in ctxdata.TableName //See this line
where p.Filename == FileName
select new { p.REF , p.JOB_TITLE })
.Take(1);
}
I'm still a newbie on C# , really appreciate if you can show me example based on this code.