Exemple #1
0
 public bool Delete(Guid Id)
 {
     bool toReturn = false;
     using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
     {
         AdvertsGroupEntity _AdvertsGroupEntity = new AdvertsGroupEntity(Id);
         if (adapter.FetchEntity(_AdvertsGroupEntity))
         {
             adapter.DeleteEntity(_AdvertsGroupEntity);
             toReturn = true;
         }
     }
     return toReturn;
 }
Exemple #2
0
        public bool Update(Guid Id, Guid AdvertId, Guid AdvertPositionId)
        {
            bool toReturn = false;
            using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {
                AdvertsGroupEntity _AdvertsGroupEntity = new AdvertsGroupEntity(Id);
                if (adapter.FetchEntity(_AdvertsGroupEntity))
                {

                    _AdvertsGroupEntity.AdvertId = AdvertId;
                    _AdvertsGroupEntity.AdvertPositionId = AdvertPositionId;
                    adapter.SaveEntity(_AdvertsGroupEntity, true);
                    toReturn = true;
                }
            }
            return toReturn;
        }
Exemple #3
0
 public bool Update(AdvertsGroupEntity _AdvertsGroupEntity, RelationPredicateBucket filter)
 {
     bool toReturn = false;
     using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
     {
         adapter.UpdateEntitiesDirectly(_AdvertsGroupEntity, filter);
         toReturn = true;
     }
     return toReturn;
 }
Exemple #4
0
        public bool Update(AdvertsGroupEntity _AdvertsGroupEntity)
        {
            bool toReturn = false;
            using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {
                RelationPredicateBucket filter = new RelationPredicateBucket();
                IPredicateExpression _PredicateExpression = new PredicateExpression();
                _PredicateExpression.Add(AdvertsGroupFields.Id == _AdvertsGroupEntity.Id);

                filter.PredicateExpression.Add(_PredicateExpression);

                adapter.UpdateEntitiesDirectly(_AdvertsGroupEntity, filter);
                toReturn = true;
            }
            return toReturn;
        }
Exemple #5
0
 public AdvertsGroupEntity SelectOne(Guid Id)
 {
     AdvertsGroupEntity toReturn = null;
     using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
     {
         AdvertsGroupEntity _AdvertsGroupEntity = new AdvertsGroupEntity(Id);
         if (adapter.FetchEntity(_AdvertsGroupEntity))
         {
             toReturn = _AdvertsGroupEntity;
         }
     }
     return toReturn;
 }
Exemple #6
0
        public AdvertsGroupEntity Insert(Guid AdvertId, Guid AdvertPositionId)
        {
            AdvertsGroupEntity _AdvertsGroupEntity = new AdvertsGroupEntity();
            using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {

                _AdvertsGroupEntity.AdvertId = AdvertId;
                _AdvertsGroupEntity.AdvertPositionId = AdvertPositionId;
                adapter.SaveEntity(_AdvertsGroupEntity, true);
            }
            return _AdvertsGroupEntity;
        }
Exemple #7
0
 public AdvertsGroupEntity Insert(AdvertsGroupEntity _AdvertsGroupEntity)
 {
     using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
     {
         adapter.SaveEntity(_AdvertsGroupEntity, true);
     }
     return _AdvertsGroupEntity;
 }