public ActionResult Index() { var model = new ModelMedicalCertificatesIndexViewModel { Objects = (from m in this.db.ModelMedicalCertificates .Where(m => m.Doctor.Id == this.Doctor.Id) .OrderBy(m => m.Name).Take(Constants.RECENTLY_REGISTERED_LIST_MAXSIZE).ToList() select new ModelMedicalCertificateViewModel() { Id = m.Id, Name = m.Name, Text = m.Text }).ToList(), Count = this.db.ModelMedicalCertificates.Count() }; return(View(model)); }
public ActionResult Index() { var model = new ModelMedicalCertificatesIndexViewModel { Objects = (from m in this.db.ModelMedicalCertificates .Where(m => m.Doctor.Id == this.Doctor.Id) .OrderBy(m => m.Name).Take(Constants.RECENTLY_REGISTERED_LIST_MAXSIZE).ToList() select new ModelMedicalCertificateViewModel() { Id = m.Id, Name = m.Name, Text = m.Text }).ToList(), Count = this.db.ModelMedicalCertificates.Count() }; return View(model); }