Ejemplo n.º 1
0
        public void Add(string resourceKind, SyncResultEntryInfo[] syncResultEntryInfos)
        {
            ISyncResultsTableAdapter  syncResultsTableAdapter  = this.GetAdapter(resourceKind);
            IResourceKindTableAdapter resourceKindTableAdapter = StoreEnvironment.Resolve <IResourceKindTableAdapter>(_context);

            using (IJetTransaction jetTransaction = _jetConnectionProvider.GetTransaction(false))
            {
                syncResultsTableAdapter.Insert(syncResultEntryInfos, _runName, _runStamp, jetTransaction);

                jetTransaction.Commit();
            }
        }
        public void RemoveAll(string resourceKind)
        {
            ISyncResultsTableAdapter  syncResultsTableAdapter  = StoreEnvironment.Resolve <ISyncResultsTableAdapter>(_context);
            IResourceKindTableAdapter resourceKindTableAdapter = StoreEnvironment.Resolve <IResourceKindTableAdapter>(_context);

            using (IJetTransaction jetTransaction = _jetConnectionProvider.GetTransaction(false))
            {
//                ResourceKindInfo resourceKindInfo = resourceKindTableAdapter.GetOrCreate(resourceKind, jetTransaction);

                try
                {
                    syncResultsTableAdapter.Delete(jetTransaction);
                }
                catch
                {
                    return;
                }

                jetTransaction.Commit();
            }
        }