using fjxw.echarge.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using fjxw.model;
using fjxw.dal;
namespace fjxw.echarge.Controllers
{
public class HomeController : Controller
{
private readonly ILogger<HomeController> _logger;
private readonly ISysUserRepository _ISysUserRepository;
public HomeController(ILogger<HomeController> logger, ISysUserRepository SysUserRepository)
{
_logger = logger;
_ISysUserRepository = SysUserRepository;
}
public IActionResult Index()
{
try
{
var userdata = _ISysUserRepository.GetUsers();
}
catch (Exception ex)
{
var errorMsg = ex.Message;
}
return View();
}
public IActionResult Privacy()
{
return View();
}
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public IActionResult Error()
{
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
}
}
}