In C# 7 you can have named tuples:
var foo = (Name: "Joe", Age: 42);
If I pass this to a MVC model using:
return View(foo);
Then what syntax should be used in the cshtml file to declare the model? Although this doesn't work, something like...
@model (string Name, int Age);
List<T>
: What happens if you need to add another property/collection? Yes, you can expand your Tuple easier than just a list, however, it could get messy very easily. Make a Model. It's MVC, not TVC. – SwenValueTuple<string, int>
? – Fixation