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.
34 lines
1.2 KiB
34 lines
1.2 KiB
using System.Linq;
|
|
using Infrastructure.Data;
|
|
using Infrastructure.Security;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.Extensions.Configuration;
|
|
using Microsoft.Extensions.Localization;
|
|
using Application.Domain.Entities;
|
|
using Infrastructure.Resources;
|
|
|
|
namespace UserCenter.Controllers
|
|
{
|
|
public class HomeController : Controller
|
|
{
|
|
private readonly IRepository<User> _userRepo;
|
|
private readonly IRepository<Site> _siteRepo;
|
|
private readonly IConfiguration _configuration;
|
|
private readonly IStringLocalizer<Resource> _localizer;
|
|
private readonly IEncryptionService _encryptionService;
|
|
|
|
public HomeController(IRepository<User> userRepo, IRepository<Site> siteRepo, IEncryptionService encryptionService, IConfiguration configuration, IStringLocalizer<Resource> localizer)
|
|
{
|
|
this._userRepo = userRepo;
|
|
this._siteRepo = siteRepo;
|
|
this._encryptionService = encryptionService;
|
|
this._configuration = configuration;
|
|
this._localizer = localizer;
|
|
}
|
|
|
|
public IActionResult Index()
|
|
{
|
|
return View(this._siteRepo.ReadOnlyTable().ToList());
|
|
}
|
|
}
|
|
} |