Missing TaskCache class in .NET Core 2

I created my own model binding in .NET Core 1.x. It works well, as shown in the official textbook .

After upgrading to version 2.0, I can no longer compile it. In the old version, it was

return TaskCache.CompletedTask; 

Now the static class is TaskCacheno longer available.

Is there any workaround known?

+4
source share
1 answer

TaskCache.CompletedTaskwas removed in .Net Core 2. Instead, just use Task.CompletedTask.

+6
source

Source: https://habr.com/ru/post/1684295/


All Articles