Guest User

Guest User

  • Tech Writer
  • 2.1k
  • 473.7k

Argument list using IList in C# asp.net mvc

Apr 30 2021 12:14 PM
Hi Team
 
I need some help, want to pass some parameters using List<>(). Here is my sample code.
  1. // controller    
  2. public IList<ExtractionViewModel> GetExtractionViewModels(int Week, string Year) // arguments    
  3. {    
  4. }    
  5.     
  6. // Model properties    
  7. public string Year { getset; }    
  8.     
  9. public int Week { getset; }    
  10.     
  11. public void ExportToExcel()    
  12. {    
  13.     var v = new GridView();    
  14.     v.DataSource = this.GetExtractionViewModels(); // How to return this argument back as List?    
  15.     ....///    
  16. } 

Answers (1)