63 lines
1.6 KiB
C#
63 lines
1.6 KiB
C#
using System;
|
|
using IRaCIS.Application.ViewModels;
|
|
using IRaCIS.Core.Application;
|
|
using IRaCIS.Core.Domain;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace EasyCaching.Demo.Interceptors.Controllers
|
|
{
|
|
[Route("test")]
|
|
[ApiController, AllowAnonymous, ApiExplorerSettings(GroupName = "Common")]
|
|
public class ValuesController : ControllerBase
|
|
{
|
|
//private readonly ITestRepository _testRepository;
|
|
|
|
|
|
//public ValuesController( ITestRepository testRepository)
|
|
//{
|
|
// _testRepository = testRepository;
|
|
//}
|
|
|
|
|
|
//[HttpPost]
|
|
//[Route("test")]
|
|
//public ActionResult test()
|
|
//{
|
|
|
|
// var test=new Test();
|
|
// test.Str = "T" + test.AutoIncrease;
|
|
// _testRepository.Add(test);
|
|
// var cc= _testRepository.SaveChanges();
|
|
// return Ok();
|
|
|
|
//}
|
|
|
|
//[HttpPost]
|
|
//[Route("castleasync")]
|
|
//public async Task<string> CastleAsync(int type = 1)
|
|
//{
|
|
// if (type == 1)
|
|
// {
|
|
// return await _cService.GetUtcTimeAsync();
|
|
// }
|
|
// else if (type == 2)
|
|
// {
|
|
// var res = await _cService.GetDemoAsync(999);
|
|
// return $"{res.Id}-{res.Name}-{res.CreateTime}";
|
|
// }
|
|
// else if (type == 3)
|
|
// {
|
|
// var res = await _cService.GetDemoListAsync(999);
|
|
// return $"{res.Count}";
|
|
// }
|
|
// else
|
|
// {
|
|
// return await Task.FromResult<string>("wait");
|
|
// }
|
|
//}
|
|
|
|
|
|
}
|
|
}
|