Ejemplo n.º 1
0
 /// <summary>
 /// Insert the new rule to the collection (+ DB)
 /// </summary>
 public RuleSet SaveNewRule(RuleSet newRule)
 {
     dbEntities.InsertNewRule(newRule);
     dbEntities.SaveAllChanges();
     rules.Add(newRule);
     return(dbEntities.GetAllRules(filterId).OrderBy(r => r.ID_Rule).Last());
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Insert the new filter to the collection (+ DB)
 /// </summary>
 public FilterSet SaveNewFilter(FilterSet newFilter)
 {
     dbEntities.InsertNewFilter(newFilter);
     dbEntities.SaveAllChanges();
     filters.Add(newFilter);
     return(dbEntities.GetAllFilters(eventId).OrderBy(f => f.ID_Filter).Last());
 }