How to receive List Type Data in razor view

Total Post:1


 509  View(s)
Rate this:

Hi Expert,

Please give me some solution to take List type data in razor view which is return by method of controller.

Here is my Controller code: 

 return View(Uow.TechnologyMasterRepository.GetAll().Where(x => x.Name.Contains(s)).ApplySortingPagingToList(sortingPaging));

and Razor View code: 

@model MindStickInterview.Data.TechnologyMaster

In razor view error raised while we run project.

Please give me solution to accomplish this task.

  1. Re: How to receive List Type Data in razor view

    Hi Mary,

    I analyzed your code. You are missing some code in your razor view.

    Please follow below line of code.

    @model IEnumerable<MindStickInterview.Data.TechnologyMaster>

    Hope its helpful for you !!!!


Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.