I am storing an object from a list to a local variable and trying to pass it to a view like below:
public class BedController : Controller
{
// GET: Bed
public ActionResult Index(PatientRegister model, int id)
{
var patient = PatientRegisterController.BedsList.Single(x => x.NewPatient.BedNumber.Equals(id.ToString()));
return View(patient);
}
}
But I don't know how to access this object from the view itself something like
patient.SelectSomeOfTheProperites //This is the object that I parsed from controller