Skip to content

Commit

Permalink
added log
Browse files Browse the repository at this point in the history
  • Loading branch information
richie676 committed May 3, 2019
1 parent 9ed33ca commit 57c2e0f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions SimpleCalculator/Controllers/CalculatorController.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc;

namespace SimpleCalculator.Controllers
{
Expand All @@ -14,7 +10,9 @@ public class CalculatorController : ControllerBase
[Route("add")]
public ActionResult<double> Add(double x, double y)
{
return x + y;
var result = x + y;
System.IO.File.AppendAllText(@"calculator.log",$"{result.ToString()}\n");
return result;
}

[HttpGet]
Expand Down

0 comments on commit 57c2e0f

Please sign in to comment.