28 lines
595 B
C#
28 lines
595 B
C#
|
using Microsoft.AspNetCore.Http;
|
|||
|
using Microsoft.AspNetCore.Mvc;
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Threading.Tasks;
|
|||
|
using TestAppRuna.Services;
|
|||
|
|
|||
|
namespace TestAppRuna.API
|
|||
|
{
|
|||
|
[Route("api/[controller]")]
|
|||
|
[ApiController]
|
|||
|
public class MathController : ControllerBase
|
|||
|
{
|
|||
|
public IMathService MathSvc { get; }
|
|||
|
public MathController(IMathService mathService)
|
|||
|
{
|
|||
|
MathSvc = mathService;
|
|||
|
}
|
|||
|
|
|||
|
[HttpGet]
|
|||
|
public int Get()
|
|||
|
{
|
|||
|
return MathSvc.Add(1, 2);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|