public static bool ContainsAllTags(ObjectivesResultsCollection x, IDictionary<string, string> tags)
 {
     var xTags = x.Tags.Tags;
     return tags.All((dictTag =>
         (xTags.Any((xTag =>
             (dictTag.Key == xTag.Name && dictTag.Value == xTag.Value))))));
 }
        public static bool ContainsAllTags(ObjectivesResultsCollection x, IDictionary <string, string> tags)
        {
            var xTags = x.Tags.Tags;

            return(tags.All((dictTag =>
                             (xTags.Any((xTag =>
                                         (dictTag.Key == xTag.Name && dictTag.Value == xTag.Value)))))));
        }
 public static int SaveObjectiveResultsSet(ObjectivesResultsCollection resultsSet)
 {
     using (var db = new OptimizationResultsContext())
     {
         db.ObjectivesResultsCollectionSet.Add(resultsSet);
         int recordsAffected = db.SaveChanges();
     }
     return resultsSet.ObjectivesResultsCollectionId;
 }
 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 Convert(IEnumerable<IObjectiveScores> results, string resultsSetName = "", IDictionary<string, string> attributes = null)
 {
     var resultsSet = new ObjectivesResultsCollection();
     resultsSet.Name = resultsSetName;
     var listOfPoints = new List<ObjectiveScoreCollection>();
     foreach (var item in results)
     {
         var newObjScore = new ObjectiveScoreCollection();
         newObjScore.Scores = Convert(item);
         newObjScore.SysConfiguration = Convert(item.GetSystemConfiguration());
         listOfPoints.Add(newObjScore);
     }
     resultsSet.ScoresSet = listOfPoints;
     resultsSet.Tags = Convert(attributes);
     return resultsSet;
 }
        public static ObjectivesResultsCollection Convert(IEnumerable <IObjectiveScores> results, string resultsSetName = "", IDictionary <string, string> attributes = null)
        {
            var resultsSet = new ObjectivesResultsCollection();

            resultsSet.Name = resultsSetName;
            var listOfPoints = new List <ObjectiveScoreCollection>();

            foreach (var item in results)
            {
                var newObjScore = new ObjectiveScoreCollection();
                newObjScore.Scores           = Convert(item);
                newObjScore.SysConfiguration = Convert(item.GetSystemConfiguration());
                listOfPoints.Add(newObjScore);
            }
            resultsSet.ScoresSet = listOfPoints;
            resultsSet.Tags      = Convert(attributes);
            return(resultsSet);
        }