Are you missing a using directive for System.Linq
?
https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.tolist
More Related Contents:
- How record values entered in a form to a List or collection in ASP MVC [closed]
- Entity Framework 5 Updating a Record
- MVC3 DropDownListFor – a simple example?
- Disable Required validation attribute under certain circumstances
- MVC Razor view nested foreach’s model
- Multiple types were found that match the controller named ‘Home’
- Injecting dependencies into ASP.NET MVC 3 action filters. What’s wrong with this approach?
- Passing object in RedirectToAction
- Non-static method requires a target
- POST json dictionary
- C# mvc 3 using selectlist with selected value in view
- ASP.NET MVC 3: Override “name” attribute with TextBoxFor
- How to use custom Authorize attribute for roles as well as a specific user?
- ASP.NET MVC 3: DefaultModelBinder with inheritance/polymorphism
- @Html.HiddenFor does not work on Lists in ASP.NET MVC
- Serializable classes and dynamic proxies in EF – how?
- Google Maps v3 geocoding server-side
- Conditionally change CSS class in Razor view
- How to declare a local variable in Razor?
- Better way to get active page link in MVC 3 Razor
- How do I get the Controller and Action names from the Referrer Uri?
- MVC HTML Helpers and Lambda Expressions
- on select change event – Html.DropDownListFor
- razor view with anonymous type model class. It is possible?
- Entity Framework – how do I get the columns?
- How to edit multiple models in a single Razor View
- Uploading image in ASP.NET MVC
- The ObjectContext instance has been disposed and can no longer be used for operations that require a connection [duplicate]
- How to use multiple form elements in ASP.NET MVC
- MVC Form Validation on Multiple Fields