From a5e3b070c192e0e287669ceb3add663ee01ed1b4 Mon Sep 17 00:00:00 2001 From: forget-the-bright Date: Mon, 29 May 2023 10:51:33 +0800 Subject: [PATCH] sumbint --- WebMVC/IEnumberable陷阱/IEnumberable陷阱.csproj | 10 ++++++++++ WebMVC/IEnumberable陷阱/Program.cs | 10 ++++++++++ WebMVC/WebMVC.sln | 8 +++++++- WebMVC/WebMVCApi/Controllers/TestController.cs | 2 ++ WebMVC/WebMVCApi/WebMVCApi.csproj | 1 + 5 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 WebMVC/IEnumberable陷阱/IEnumberable陷阱.csproj create mode 100644 WebMVC/IEnumberable陷阱/Program.cs diff --git a/WebMVC/IEnumberable陷阱/IEnumberable陷阱.csproj b/WebMVC/IEnumberable陷阱/IEnumberable陷阱.csproj new file mode 100644 index 0000000..74abf5c --- /dev/null +++ b/WebMVC/IEnumberable陷阱/IEnumberable陷阱.csproj @@ -0,0 +1,10 @@ + + + + Exe + net6.0 + enable + enable + + + diff --git a/WebMVC/IEnumberable陷阱/Program.cs b/WebMVC/IEnumberable陷阱/Program.cs new file mode 100644 index 0000000..de26713 --- /dev/null +++ b/WebMVC/IEnumberable陷阱/Program.cs @@ -0,0 +1,10 @@ +namespace IEnumberable陷阱 +{ + internal class Program + { + static void Main(string[] args) + { + Console.WriteLine("Hello, World!"); + } + } +} \ No newline at end of file diff --git a/WebMVC/WebMVC.sln b/WebMVC/WebMVC.sln index 93ed13f..f779728 100644 --- a/WebMVC/WebMVC.sln +++ b/WebMVC/WebMVC.sln @@ -9,7 +9,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebMVCApi", "WebMVCApi\WebM EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DIWebApi", "DIWebApi\DIWebApi.csproj", "{47083CA0-B1CC-4F23-A78B-390B3D19B349}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassLibrary1", "ClassLibrary1\ClassLibrary1.csproj", "{4E56A6DB-EFE1-44C2-9C14-8EF49EAF7E9F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ClassLibrary1", "ClassLibrary1\ClassLibrary1.csproj", "{4E56A6DB-EFE1-44C2-9C14-8EF49EAF7E9F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IEnumberable陷阱", "IEnumberable陷阱\IEnumberable陷阱.csproj", "{A6B358CF-6584-4C50-8939-4DD32AF0EFE2}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -33,6 +35,10 @@ Global {4E56A6DB-EFE1-44C2-9C14-8EF49EAF7E9F}.Debug|Any CPU.Build.0 = Debug|Any CPU {4E56A6DB-EFE1-44C2-9C14-8EF49EAF7E9F}.Release|Any CPU.ActiveCfg = Release|Any CPU {4E56A6DB-EFE1-44C2-9C14-8EF49EAF7E9F}.Release|Any CPU.Build.0 = Release|Any CPU + {A6B358CF-6584-4C50-8939-4DD32AF0EFE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A6B358CF-6584-4C50-8939-4DD32AF0EFE2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A6B358CF-6584-4C50-8939-4DD32AF0EFE2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A6B358CF-6584-4C50-8939-4DD32AF0EFE2}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/WebMVC/WebMVCApi/Controllers/TestController.cs b/WebMVC/WebMVCApi/Controllers/TestController.cs index 27da613..7441ffd 100644 --- a/WebMVC/WebMVCApi/Controllers/TestController.cs +++ b/WebMVC/WebMVCApi/Controllers/TestController.cs @@ -68,10 +68,12 @@ namespace WebMVCApi.Controllers { return new { Id = classNom+6, schoolName=schoolName + "扛把子", }; } + [HttpPut("UpdatePerson")] public async Task UpdatePerson(int id, Person p1) { return _memoryCache.GetOrCreateAsync("val", async (e)=>{ + return $"id {id} 的用户{p1.Name}更新成功 {DateTime.Now}"; }); } diff --git a/WebMVC/WebMVCApi/WebMVCApi.csproj b/WebMVC/WebMVCApi/WebMVCApi.csproj index 87ec459..107ee21 100644 --- a/WebMVC/WebMVCApi/WebMVCApi.csproj +++ b/WebMVC/WebMVCApi/WebMVCApi.csproj @@ -16,6 +16,7 @@ +