using Microsoft.AspNetCore.Mvc; using PolyclinicContracts.BusinessLogicsContracts; using PolyclinicContracts.ViewModels; using PolyclinicWebAppImplementer.Models; namespace PolyclinicWebAppImplementer.Controllers { public class DiagnosesController : Controller { private readonly ILogger _logger; private readonly IDiagnoseLogic _diagnoseLogic; public DiagnosesController(ILogger logger, IDiagnoseLogic diagnoseLogic) { _logger = logger; _diagnoseLogic = diagnoseLogic; } [HttpGet] public IActionResult Index() { List diagnoses = _diagnoseLogic.ReadList(); if (diagnoses == null) { diagnoses = new(); } return View(diagnoses); } } }