I would like to know is there any smilar patterns for 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();
Telerik使用这种模式但是存在问题。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.