public void TestLogOperation_Valid_Calculation()
        {
            HomeController homeCtrl = new HomeController();
            CalculationModel calculationModel = new CalculationModel()
            {
                OperationName = "Testing",
                OperatorA = 1,
                OperatorB = 1,
                Result = 1
            };

            Assert.AreEqual(0, homeCtrl.LogOperation(calculationModel).Data);
        }
        public JsonResult LogOperation(CalculationModel calculation)
        {
            int result = -1;

            CalculationManager calcManager = new CalculationManager();

            if (calculation != null)
            {
                calculation.CreateDT = DateTime.UtcNow;
                result = calcManager.LogCalculation(calculation.GetCalculation());
            }

            return new JsonResult { Data = result };
        }