You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
737 B
26 lines
737 B
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<Device> _cameraRepo;
|
|
private readonly DeviceService _onvifService;
|
|
|
|
public HomeController(DeviceService onvifService, IRepository<Device> cameraRepo)
|
|
{
|
|
this._cameraRepo = cameraRepo;
|
|
this._onvifService = onvifService;
|
|
}
|
|
|
|
public IActionResult Index()
|
|
{
|
|
var model = this._cameraRepo.ReadOnlyTable().Include(o => o.Data).ToList();
|
|
return View(model);
|
|
}
|
|
}
|
|
} |