Ejemplo n.º 1
0
 public IActionResult Index(CalculatorViewModel model, string command)
 {
     if (command == "add")
     {
         _modelService.Addition(model);
     }
     if (command == "sub")
     {
         _modelService.Sububstract(model);
     }
     if (command == "mul")
     {
         _modelService.Multiply(model);
     }
     if (command == "div")
     {
         _modelService.Divide(model);
     }
     if (command == "mod")
     {
         _modelService.Modulo(model);
     }
     return(View(model));
 }
Ejemplo n.º 2
0
 public Number(double[] ids, ICalculate calculate)
 {
     Ids      = ids;
     addition = calculate.Addition();
 }