Converting to EF, need to work on TS

This commit is contained in:
Lani Aung
2021-11-19 23:04:15 -07:00
parent 1fd14ebafd
commit 744fc6bc57
43 changed files with 2159 additions and 542 deletions
+3 -4
View File
@@ -1,7 +1,6 @@
using System;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using fxl.codes.kisekae.Models;
using fxl.codes.kisekae.Services;
using Microsoft.AspNetCore.Http;
@@ -21,10 +20,10 @@ namespace fxl.codes.kisekae.Controllers
_databaseService = databaseService;
}
public async Task<IActionResult> Index()
public IActionResult Index()
{
var files = await _databaseService.GetAll();
return View(files.Select(x => new ConfigurationModel(x)));
var files = _databaseService.GetAll();
return View(files.Select(x => new KisekaeModel(x)));
}
[HttpPost]
+5 -5
View File
@@ -1,4 +1,4 @@
using System.Threading.Tasks;
using fxl.codes.kisekae.Models;
using fxl.codes.kisekae.Services;
using Microsoft.AspNetCore.Mvc;
@@ -13,11 +13,11 @@ namespace fxl.codes.kisekae.Controllers
_databaseService = databaseService;
}
public async Task<IActionResult> Index(int id)
public IActionResult Index(int id)
{
var model = await _databaseService.LoadConfig(id);
return View(model);
var config = _databaseService.GetConfig(id);
return View(new PlaysetModel(config));
}
}
}