rspec/rules/S5770/description.adoc

4 lines
391 B
Plaintext
Raw Normal View History

2020-06-30 12:50:28 +02:00
ViewBag and ViewData dictionaries enable controllers to pass data to their views as weakly typed collections. Reading the provided values is dynamically resolved at runtime without any compile-time checking. This can lead to unexpected behavior, since reading a missing value does not produce an exception.
Controllers should pass data to their views via a strongly typed view model class.