예제 #1
0
 public static async Task 异步创建对象(Donator donator)
 {
     using (var db = new DonatorContext())
     {
         db.Donators.Add(donator);
         await db.SaveChangesAsync();
     }
 }
예제 #2
0
파일: Program.cs 프로젝트: yhhno/EF6Demo
 public static async Task 异步创建对象(Donator donator)
 {
     using (var db = new DonatorContext())
     {
         db.Donators.Add(donator);
         await db.SaveChangesAsync();
     }
 }