Hello everyone,
I'm working on MVC 5, there is a viewmodel class and contain a static list as the same class.
- public class PartnerProjectVM
- {
- public int idPartnerProject { get; set; }
- public string ProjectName { get; set; }
- public string ProjectDescription { get; set; }
- public static List<PartnerProjectVM> listPartnerProjectVM = new List<PartnerProjectVM>();
- }
In view,
How can I check
- @model Reboxwebapp.Models.ViewModel.PartnerProjectVM
- @if (listPartnerProjectVM.Count() != null)
- {
- <div class="col-sm-3">
- <div>
- <a class="list-group-item active left-menu-head">Projects List</a>
- @foreach (var item in listPartnerProjectVM)
- {
- <a href="#" id="idProject" class="list-group-item" name="@item.idPartnerProject">@item.ProjectName</a>
- }
-
- </div>
- </div>
- }
Here error occurred. please help me...