Exemple #1
0
 public bool Delete(string Feature, string CompatibleSchemaVersion)
 {
     bool toReturn = false;
     using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
     {
         AspnetSchemaVersionsEntity _AspnetSchemaVersionsEntity = new AspnetSchemaVersionsEntity(Feature, CompatibleSchemaVersion);
         if (adapter.FetchEntity(_AspnetSchemaVersionsEntity))
         {
             adapter.DeleteEntity(_AspnetSchemaVersionsEntity);
             toReturn = true;
         }
     }
     return toReturn;
 }
Exemple #2
0
        public bool Update(string Feature, string CompatibleSchemaVersion, bool IsCurrentVersion)
        {
            bool toReturn = false;
            using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {
                AspnetSchemaVersionsEntity _AspnetSchemaVersionsEntity = new AspnetSchemaVersionsEntity(Feature, CompatibleSchemaVersion);
                if (adapter.FetchEntity(_AspnetSchemaVersionsEntity))
                {

                    _AspnetSchemaVersionsEntity.IsCurrentVersion = IsCurrentVersion;
                    adapter.SaveEntity(_AspnetSchemaVersionsEntity, true);
                    toReturn = true;
                }
            }
            return toReturn;
        }
Exemple #3
0
 public bool Update(AspnetSchemaVersionsEntity _AspnetSchemaVersionsEntity, RelationPredicateBucket filter)
 {
     bool toReturn = false;
     using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
     {
         adapter.UpdateEntitiesDirectly(_AspnetSchemaVersionsEntity, filter);
         toReturn = true;
     }
     return toReturn;
 }
Exemple #4
0
        public bool Update(AspnetSchemaVersionsEntity _AspnetSchemaVersionsEntity)
        {
            bool toReturn = false;
            using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {
                RelationPredicateBucket filter = new RelationPredicateBucket();
                IPredicateExpression _PredicateExpression = new PredicateExpression();
                _PredicateExpression.Add(AspnetSchemaVersionsFields.Feature == _AspnetSchemaVersionsEntity.Feature);
                    _PredicateExpression.Add(AspnetSchemaVersionsFields.CompatibleSchemaVersion == _AspnetSchemaVersionsEntity.CompatibleSchemaVersion);

                filter.PredicateExpression.Add(_PredicateExpression);

                adapter.UpdateEntitiesDirectly(_AspnetSchemaVersionsEntity, filter);
                toReturn = true;
            }
            return toReturn;
        }
Exemple #5
0
 public AspnetSchemaVersionsEntity SelectOne(string Feature, string CompatibleSchemaVersion)
 {
     AspnetSchemaVersionsEntity toReturn = null;
     using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
     {
         AspnetSchemaVersionsEntity _AspnetSchemaVersionsEntity = new AspnetSchemaVersionsEntity(Feature, CompatibleSchemaVersion);
         if (adapter.FetchEntity(_AspnetSchemaVersionsEntity))
         {
             toReturn = _AspnetSchemaVersionsEntity;
         }
     }
     return toReturn;
 }
Exemple #6
0
        public AspnetSchemaVersionsEntity Insert(bool IsCurrentVersion)
        {
            AspnetSchemaVersionsEntity _AspnetSchemaVersionsEntity = new AspnetSchemaVersionsEntity();
            using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {

                _AspnetSchemaVersionsEntity.IsCurrentVersion = IsCurrentVersion;
                adapter.SaveEntity(_AspnetSchemaVersionsEntity, true);
            }
            return _AspnetSchemaVersionsEntity;
        }
Exemple #7
0
        public AspnetSchemaVersionsEntity Insert(string Feature, string CompatibleSchemaVersion, bool IsCurrentVersion)
        {
            AspnetSchemaVersionsEntity _AspnetSchemaVersionsEntity = new AspnetSchemaVersionsEntity();
            using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {

                _AspnetSchemaVersionsEntity.Feature = Feature;
                _AspnetSchemaVersionsEntity.CompatibleSchemaVersion = CompatibleSchemaVersion;
                _AspnetSchemaVersionsEntity.IsCurrentVersion = IsCurrentVersion;
                adapter.SaveEntity(_AspnetSchemaVersionsEntity, true);
            }
            return _AspnetSchemaVersionsEntity;
        }
Exemple #8
0
 public AspnetSchemaVersionsEntity Insert(AspnetSchemaVersionsEntity _AspnetSchemaVersionsEntity)
 {
     using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
     {
         adapter.SaveEntity(_AspnetSchemaVersionsEntity, true);
     }
     return _AspnetSchemaVersionsEntity;
 }