简体   繁体   English

Telerik中基于任务的异步模式支持

[英]Task-based Asynchronous Pattern support in Telerik

I would like to know is there any smilar patterns for telerik? 我想知道telerik是否有任何模糊的模式?

https://entityframework.codeplex.com/wikipage?title=Task-based%20Asynchronous%20Pattern%20support%20in%20EF.#ThreadSafety https://entityframework.codeplex.com/wikipage?title=Task-based%20Asynchronous%20Pattern%20support%20in%20EF.#ThreadSafety

await query.ForEachAsync(employee =>
{
     Console.WriteLine(employee);
});

// Modify
var product1 = await context.Products.FindAsync(1);
product1.Name= "Smarties";

// Delete
var product2 = awaitcontext.Products.FindAsync(2);
context.Products.Remove(product2);

// Add
var product3 = new Product() { Name = "Branston Pickle" };
context.Products.Add(product3);

// Save
int savedCount = await context.SaveChangesAsync();

Console.WriteLine("Affected entities: " + savedCount); // 3

//Raw sql Queries
var categories = await context.Database.SqlQuery<Category>(
"select * from Categories").ToListAsync();

Telerik使用这种模式但是存在问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 具有基于任务的异步模式的UDP侦听器 - UDP listener with task-based asynchronous pattern C#中基于任务的异步方法的超时模式 - Timeout pattern on task-based asynchronous method in C# 从异步编程模型(APM)迁移到基于任务的异步模式(TAP) - Moving from Asynchronous Programming Model (APM) to Task-based Asynchronous Pattern (TAP) 在双工WCF服务的客户端中使用基于任务的异步模式时出错 - Error when I use the Task-based Asynchronous Pattern in the client of duplex WCF service 通过基于任务的异步模式 (TAP) 接触的 Windows 服务作业监视器 - Windows Service Job Monitor via Touch of Task-based Asynchronous Pattern (TAP) Oracle Client与基于任务的异步模式(异步/等待) - Oracle Client vs. Task-based Asynchronous Pattern (async/await) 在.NET 4.0和C#4.0中使用基于任务的异步模式(TAP) - Use Task-based Asynchronous Pattern (TAP) with .NET 4.0 and C# 4.0 这是实现基于任务的异步方法的正确方法吗? - Is this correct way to implement task-based asynchronous method? 基于任务的空闲检测 - Task-based idle detection System.NotSupportedException:&#39;不支持在基于任务的异步方法上使用&#39;System.Threading.CancellationToken&#39;。&#39; - System.NotSupportedException: 'The use of 'System.Threading.CancellationToken' on the task-based asynchronous method is not supported.'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM