示例#1
0
 public void Add(Application app)
 {
     using (var context = new ConfigContext())
     {
         context.Applications.Add(app);
         context.SaveChanges();
     }
 }
示例#2
0
 public void Delete(Application application)
 {
     using (var context = new ConfigContext())
     {
         var appFromDb = context.Applications.Find(application.ApplicationID);
         context.Applications.Remove(appFromDb);
         context.SaveChanges();
     }
 }