0

I'm trying to figure out how to set the DbSet dynamically. The sample below shows where I have to set the DbSet "Barber" manually. Is there a way I can poll the DbContext and set the Type based on a selection picked from a drop down box?

  var query = (from c in ctxCoin.Barber
                     select new T
                     {
                         Name = c.Name,
                         Year = c.Year
                     }).ToList();
Bryan K
  • 203
  • 1
  • 2
  • 7

0 Answers0