In my Repository class I have this two queries that I want it to appear in just one view:
public ClassXXXX GetxxxoList(string Name)
{
return context.ClassXXXX.Where(v => v.Name == Name).Single();
}
And the second query in Repository class I have:
public IEnumerable<ClassXXXX> List()
{
return context.ClassXXXX.ToList();
}
Then in my view I am doing this:
@model IEnumerable<Namespace.Models.ClassXXXX>
@model Namespace.Models.ClassXXXX
To return the two queries in my view respectively. But ASP.NET throws exception on using @model twice in just one view.