'Showing generic lists on razor index list view
I created a double linked generic list, in each node I storage models from MVC. Now I want to display the content of my generic list on the controller index view but I can't. It appears that I can't show a generic list using default razor index list view.
This is my generic list
using System.Collections.Generic;
namespace ClassLibrary1
{
public class GenericList<T>
{
Node<T> Head;
public void InsertNew(T value)
{
Node<T> NewNode = new Node<T>();
NewNode.data = value;
NewNode.next = Head;
if (Head != null)
{
Head.previous = NewNode;
}
Head = NewNode;
}
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
