Migrate to .NET Core 3.1.

This commit is contained in:
2020-05-21 05:01:35 +01:00
parent e3ebd41291
commit 880f66df1a
12 changed files with 67 additions and 79 deletions

View File

@@ -42,9 +42,9 @@ namespace Marechai.Controllers
public class HomeController : Controller
{
readonly MarechaiContext _context;
readonly IHostingEnvironment hostingEnvironment;
readonly IWebHostEnvironment hostingEnvironment;
public HomeController(IHostingEnvironment env, MarechaiContext context)
public HomeController(IWebHostEnvironment env, MarechaiContext context)
{
hostingEnvironment = env;
_context = context;
@@ -56,7 +56,7 @@ namespace Marechai.Controllers
List<NewsModel> news = new List<NewsModel>();
foreach(News @new in _context.News.OrderByDescending(t => t.Date).Take(10))
foreach(News @new in _context.News.OrderByDescending(t => t.Date).Take(10).ToList())
{
Machine machine = _context.Machines.Find(@new.AddedId);