예제 #1
0
 public void InsertConfiguration(Configuration config)
 {
     using (var context = GetContext()) {
         context.Configurations.Add(config);
         context.SaveChanges();
     }
 }
예제 #2
0
 public void UpdateConfiguration(Configuration config)
 {
     using (var context = GetContext()) {
         context.Configurations.Attach(config);
         context.Entry(config).State = EntityState.Modified;
         context.SaveChanges();
     }
 }