public IActionResult Index(Operation model) { var factory = new CalcFactory(); var operation = factory.GetOperation(model.OperationType); model.Result = operation.MathOperation(model.NumberA, model.NumberB); return(View(model)); }
public Type CalcFactoryTest(OperationType operation) { var factory = new CalcFactory(); return(factory.GetOperation(operation).GetType()); }