public RootObject SaveRootObject(RootObject rootObject) { if (rootObject != null) { _model.RootObjects.Add(rootObject); _model.SaveChanges(); } return(rootObject); }
public ApiEndpoint SaveEndPoint(ApiEndpoint apiEndpoint) { ApiEndpoint retVal = null; if (apiEndpoint != null) { retVal = _model.ApiEndpoints.Add(apiEndpoint); _model.SaveChanges(); } return(retVal); }
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); }