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