public RootObject SaveRootObject(RootObject rootObject)
        {
            if (rootObject != null)
            {
                _model.RootObjects.Add(rootObject);
                _model.SaveChanges();
            }

            return(rootObject);
        }
Exemple #2
0
        public ApiEndpoint SaveEndPoint(ApiEndpoint apiEndpoint)
        {
            ApiEndpoint retVal = null;

            if (apiEndpoint != null)
            {
                retVal = _model.ApiEndpoints.Add(apiEndpoint);
                _model.SaveChanges();
            }
            return(retVal);
        }
Exemple #3
0
 public Event SaveEvent(Event eventObject)
 {
     if (eventObject != null)
     {
         if (_model.Events.Any(r => !r.HashedByteValue.SequenceEqual(eventObject.HashedByteValue)))
         {
             _model.Events.Add(eventObject);
             _model.SaveChanges();
         }
     }
     return(eventObject);
 }