using Application.Domain.Entities; using Infrastructure.Data; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using System.Linq; namespace ONVIFService.Controllers { public class HomeController : Controller { private readonly IRepository _cameraRepo; private readonly DeviceService _onvifService; public HomeController(DeviceService onvifService, IRepository cameraRepo) { this._cameraRepo = cameraRepo; this._onvifService = onvifService; } public IActionResult Index() { var model = this._cameraRepo.ReadOnlyTable().Include(o => o.Data).ToList(); return View(model); } } }