Model:
public class TestModel
{
[Column]
public string Name { get; set; }
}
Controller:
TestModel[] metadata = context.GetTable<TestModel>().ToArray();
return View(itemsToShow.ToList());
the name column and sorts it alphabethically on user selection which works fine (have tested it in debug mode - for example if user selects 'd' it only will display the items starting with 'd'.)
The problem is when i add "@model IEnumerable" and foreach loop in the view I get the error.
items
collection is of typeList<string>
, notList<TestModel>
. – Jeroen Vannevel