Ejemplo n.º 1
0
        public virtual void Delete(IEnumerable <T> entities)
        {
            var entityParam = new TransmitterParam {
                Name = "entities", Type = typeof(IEnumerable <T>), Value = entities
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(T).Name, "Delete", new[] { entityParam });

            ProcessTelegramm(telegram);
        }
Ejemplo n.º 2
0
        protected override void BeginChanges_Internal(IsolationLevel isolationLevel)
        {
            var uowParam = new TransmitterParam {
                Name = "IsolationLevel", Type = typeof(IsolationLevel), Value = isolationLevel
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(IUnitOfWork).Name, "BeginChanges", new[] { uowParam });

            ProcessTelegramm(telegram);
        }
Ejemplo n.º 3
0
        public void Update(IEnumerable <XmlDocument> xmlDocuments)
        {
            var xmlDocumentsParam = new TransmitterParam {
                Name = "xmlDocuments", Type = typeof(IEnumerable <XmlDocument>), Value = xmlDocuments
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(T).Name, "Update", new[] { xmlDocumentsParam });

            ProcessTelegramm(telegram);
        }
Ejemplo n.º 4
0
        public virtual void Delete(T entity)
        {
            var entityParam = new TransmitterParam {
                Name = "entity", Type = typeof(T), Value = entity
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(T).Name, "Delete", new[] { entityParam });

            ProcessTelegramm(telegram);
        }
Ejemplo n.º 5
0
        public void Insert(ref IEnumerable <T> entities)
        {
            var entityParam = new TransmitterParam {
                Name = "entities", Type = typeof(IEnumerable <T>), Value = entities, IsOut = true
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(T).Name, "Insert", new[] { entityParam });

            ProcessTelegramm(telegram);
        }
Ejemplo n.º 6
0
        public virtual void Update(XmlDocument xmlDoc)
        {
            var xmlDocParam = new TransmitterParam {
                Name = "xmlDoc", Type = typeof(XmlDocument), Value = xmlDoc
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(T).Name, "Update", new[] { xmlDocParam });

            ProcessTelegramm(telegram);
        }
Ejemplo n.º 7
0
        public virtual void DeleteByKey(TKey key)
        {
            var keyParam = new TransmitterParam {
                Name = "key", Type = typeof(TKey), Value = key
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(T).Name, "DeleteByKey", new[] { keyParam });

            ProcessTelegramm(telegram);
        }
Ejemplo n.º 8
0
        public virtual void Insert(ref T entity)
        {
            var param = new TransmitterParam {
                Name = "entity", Type = typeof(T), Value = entity, IsOut = true
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(T).Name, "Insert", new[] { param });

            ProcessTelegramm(telegram);
            entity = (T)param.Value;
        }
Ejemplo n.º 9
0
        public void ChangeStateByKey(object entityKey, string operationName)
        {
            var entityKeyParam = new TransmitterParam {
                Name = "entityKey", Type = typeof(object), Value = entityKey
            };
            var operationNameParam = new TransmitterParam {
                Name = "operationName", Type = typeof(string), Value = operationName
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(T).Name, "ChangeStateByKey", new[] { entityKeyParam, operationNameParam });

            ProcessTelegramm(telegram);
        }
Ejemplo n.º 10
0
        public virtual XmlDocument GetXml(TKey key, string attrentity)
        {
            var resultParam = new TransmitterParam {
                Name = "result", Type = typeof(XmlDocument), IsOut = true
            };
            var keyParam = new TransmitterParam {
                Name = "key", Type = typeof(TKey), Value = key
            };
            var attrentityParam = new TransmitterParam {
                Name = "attrentity", Type = typeof(string), Value = attrentity
            };

            var telegram = new RepoQueryTelegramWrapper(typeof(T).Name, "GetXml", new[] { resultParam, keyParam, attrentityParam });

            ProcessTelegramm(telegram);
            return((XmlDocument)resultParam.Value);
        }
Ejemplo n.º 11
0
        public virtual List <XmlDocument> GetXmlFiltered(string filter, string attrentity)
        {
            ClearStatistics();
            var resultParam = new TransmitterParam {
                Name = "result", Type = typeof(List <XmlDocument>), IsOut = true
            };
            var filterParam = new TransmitterParam {
                Name = "filter", Type = typeof(string), Value = filter
            };
            var attrentityParam = new TransmitterParam {
                Name = "attrentity", Type = typeof(string), Value = attrentity
            };

            var telegram = new RepoQueryTelegramWrapper(typeof(T).Name, "GetXmlFiltered", new[] { resultParam, filterParam, attrentityParam });

            ProcessTelegramm(telegram);
            _lastQueryExecutionTime = telegram.LastQueryExecutionTime;
            return((List <XmlDocument>)resultParam.Value);
        }