How to receive List Type Data in razor view

Total Post:1

Points:7
C#
 242  View(s)
Ratings:
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. Post:44

    Points:310
    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 !!!!

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!