Program -7 Model: Patient.cs public class Patient { public int Id { get; set; } public string Name { get; set; } public string Email { get; set; } public DateTime DOB { get; set; } public string Condition { get; set; } } Controller: HomeController.cs using System.Collections.Generic; using System.Web.Mvc; using HealthCarePortal.Models; public class HomeController : Controller { static List patients = new List(); public ActionResult Index() => View(patients); [HttpPost] public ActionResult Add(Patient p) { p.Id = patients.Count + 1; patients.Add(p); return RedirectToAction("Index"); } } View: Index.cshtml @model List @{ Layout = "~/Views/Shared/_Layout.cshtml"; }

Health Care Dashboard

Patient Records

@foreach (var p in Model) { }
IDNameEmailDOBCondition
@p.Id@p.Name@p.Email@p.DOB.ToShortDateString()@p.Condition
Layout: _Layout.cshtml HealthCare Portal @RenderBody()