public ActionResult <APIResponse> Post([FromBody] OEEViewModel oEEViewModel) { APIResponse result = new APIResponse("Success", "Data saved successfully."); try { OEE.SaveOEEData(_context, oEEViewModel); } catch (Exception ex) { result.Status = "Failed"; result.Message = ex.Message; } return(result); }
public OEEController(ApplicationDbContext context) { _context = context; _productionViewModel = new ProductionViewModel(); _oeeViewModel = new OEEViewModel(); }