autocomplete
This commit is contained in:
parent
b8809deaa1
commit
aaa49788dc
4 changed files with 52 additions and 14 deletions
|
|
@ -1,11 +1,11 @@
|
|||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.DataProtection;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using nuget_host.Entities;
|
||||
using nuget_host.Data;
|
||||
using System.Linq;
|
||||
using nuget_host.ViewModels;
|
||||
|
||||
namespace nuget_host.Controllers
|
||||
{
|
||||
|
|
@ -15,19 +15,25 @@ namespace nuget_host.Controllers
|
|||
readonly IHostingEnvironment _environment;
|
||||
public SmtpSettings _smtpSettings { get; } //set only via Secret Manager
|
||||
|
||||
private ApplicationDbContext _dbContext;
|
||||
|
||||
public HomeController(
|
||||
IOptions<SmtpSettings> smtpSettings,
|
||||
IHostingEnvironment environment,
|
||||
ApplicationDbContext dbContext,
|
||||
ILogger<HomeController> logger)
|
||||
{
|
||||
_environment = environment;
|
||||
_logger = logger;
|
||||
_smtpSettings = smtpSettings.Value;
|
||||
_dbContext = dbContext;
|
||||
}
|
||||
|
||||
public IActionResult Index()
|
||||
{
|
||||
return View();
|
||||
return View(new HomeIndexViewModel{
|
||||
PkgCount = _dbContext.Packages.Count()
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult About()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue