public static int SaveObjectiveResultsSet(ObjectivesResultsCollection resultsSet)
 {
     using (var db = new OptimizationResultsContext())
     {
         db.ObjectivesResultsCollectionSet.Add(resultsSet);
         int recordsAffected = db.SaveChanges();
     }
     return resultsSet.ObjectivesResultsCollectionId;
 }
 public static ObjectivesResultsCollection[] FindResultsTagged(IDictionary <string, string> tags)
 {
     using (var db = new OptimizationResultsContext())
     {
         return(db.ObjectivesResultsCollectionSet
                .AsNoTracking()
                .Where((x => ContainsAllTags(x, tags))).ToArray());//.Tags.Tags.FirstOrDefault((y => y.TagId).FirstOrDefault().Value );
     }
 }
 public static ObjectivesResultsCollection[] FindResultsTagged(IDictionary<string, string> tags)
 {
     using (var db = new OptimizationResultsContext())
     {
         return db.ObjectivesResultsCollectionSet
             .AsNoTracking()
             .Where((x => ContainsAllTags(x, tags))).ToArray();//.Tags.Tags.FirstOrDefault((y => y.TagId).FirstOrDefault().Value );
     }
 }
 public static int SaveObjectiveResultsSet(ObjectivesResultsCollection resultsSet)
 {
     using (var db = new OptimizationResultsContext())
     {
         db.ObjectivesResultsCollectionSet.Add(resultsSet);
         int recordsAffected = db.SaveChanges();
     }
     return(resultsSet.ObjectivesResultsCollectionId);
 }