using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using PSTW_CentralSystem.Areas.Inventory.Models; using PSTW_CentralSystem.DBContext; using PSTW_CentralSystem.Models; namespace PSTW_CentralSystem.Controllers { public class InventoryController : Controller { private readonly ILogger _logger; private readonly CentralSystemContext _centralDbContext; public InventoryController(ILogger logger, CentralSystemContext centralDbContext) { _logger = logger; _centralDbContext = centralDbContext; } [HttpGet("ItemInformation/{Id}")] public async Task ItemInformation(int Id) { var item = await _centralDbContext.Items.FindAsync(Id); return View(Json(item)); } [HttpPost("ItemInformation/{id}")] public IActionResult ItemInformation(int id, [FromBody] ItemModel item) { return View(); } } }