29 lines
679 B
C#
29 lines
679 B
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Diagnostics.CodeAnalysis;
|
|||
|
using System.Linq;
|
|||
|
using System.Threading.Tasks;
|
|||
|
using Microsoft.AspNetCore.Mvc;
|
|||
|
using Microsoft.Extensions.Logging;
|
|||
|
|
|||
|
namespace bahnplan.web.Controllers {
|
|||
|
[ApiController]
|
|||
|
[Route("api/[controller]")]
|
|||
|
public class TestController : ControllerBase {
|
|||
|
[HttpGet]
|
|||
|
public ApiResponse Get() {
|
|||
|
return new ApiResponse("test", 4);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
[SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")]
|
|||
|
public class ApiResponse {
|
|||
|
public string String1 { get; }
|
|||
|
public int Int1 { get; }
|
|||
|
|
|||
|
public ApiResponse(string string1, int int1) {
|
|||
|
String1 = string1;
|
|||
|
Int1 = int1;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|