public OperationOutput <long> Do(OperationInput <long> input) { var result = input.Num1 / input.Num2; return(new OperationOutput <long>() { Result = result }); }
public OperationOutput <decimal> Do(OperationInput <decimal> input) { var result = input.Num1 + input.Num2; return(new OperationOutput <decimal>() { Result = result }); }
public OperationOutput <int> Do(OperationInput <int> input) { var result = input.Num1 * input.Num2; return(new OperationOutput <int>() { Result = result }); }
public void Save(int operationType, OperationInput <long> input, OperationOutput <long> output) { UserOperations opr = new UserOperations(); opr.Operation = operationType; opr.Result = output.Result.ToString(); opr.FirstValue = input.Num1.ToString(); opr.SecondValue = input.Num2.ToString(); _jatodb.UserOperations.Add(opr); _jatodb.SaveChanges(); }