예제 #1
0
 public void SaveOrUpdate(Configuration configuration)
 {
     using (DomumContext context = new DomumContext())
     {
         context.Configurations.Add(configuration);
         context.SaveChanges();
     }
 }
예제 #2
0
 public Configuration GetConfigurationById(int id)
 {
     // Nog ff wachten met Ioc container
     using (DomumContext context = new DomumContext())
     {
         return context.Configurations.SingleOrDefault(c => c.ConfigID == id);
     }
 }