From 93d363f76c4c908612d24ba56722d6c6359f7402 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 6 Jun 2022 15:45:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/TestService.cs | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/IRaCIS.Core.Application/TestService.cs b/IRaCIS.Core.Application/TestService.cs index f188cbbcf..4f1219c94 100644 --- a/IRaCIS.Core.Application/TestService.cs +++ b/IRaCIS.Core.Application/TestService.cs @@ -9,13 +9,13 @@ namespace IRaCIS.Application.Services private readonly IRepository _dicRepository; private readonly IRepository _trialRepository; - private readonly IDistributedCache _cache; + //private readonly IDistributedCache _cache; - public TestService(IRepository dicRepository, IRepository trialRepository, IDistributedCache cache) + public TestService(IRepository dicRepository, IRepository trialRepository/*, IDistributedCache cache*/) { _dicRepository = dicRepository; _trialRepository = trialRepository; - _cache = cache; + //_cache = cache; } public string Get() @@ -24,7 +24,7 @@ namespace IRaCIS.Application.Services } [HttpPost] - public string Get(testModel testModel) + public string Get(TestModel testModel) { //_cache.SetString("test" , "cacheStr"); @@ -73,13 +73,22 @@ namespace IRaCIS.Application.Services return _userInfo.LocalIp; } + + + + public string PostData(List testModelList) + { + return string.Join(",", testModelList); + } } - public class testModel + public class TestModel { //[Required] - //public string Id { get; set; } + public string Id { get; set; } + + public string Name { get; set; } } }