我想知道telerik是否有任何微笑模式?
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();
答案 0 :(得分:0)
Telerik使用此模式但存在此问题。