This is my first question, I'm doing the best I can to be understand.
I want to insert in table that has many unique properties.
I want to use string instead of property in a Linq expression.
I want to make something like this:
public List<string> AddEmploye(Employe pEmploye)
{
   List<string> NonUnique = new List<string>();
   List<string> Prop = new List<string>
      {
         "ID",
         "NAS",
         "CODE",
      };
   foreach (var prop in Props)
   {
      var result = (from t in _context.TEMP02A
                  where t.prop == pEmploye.prop
                  select t.name).ToList();
      if (result.Count() > 0)
        NonUnique.Add(prop);
   }
   return NonUnique;
}
I tried many solutions proposed on StackOverflow but neither worked for my case.
I tried these solutions: 0, 1, 2, 3, and many others, but none of those solutions works for my case.
I expect the result.count to be 0 or higher, but when I tried this solution, I got this error :
LINQ to Entities does not recognize propertyInfo.GetValue.
Any suggestions?
 
     
    