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; }
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; }
public bool Update(AdvertsGroupEntity _AdvertsGroupEntity, RelationPredicateBucket filter) { bool toReturn = false; using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { adapter.UpdateEntitiesDirectly(_AdvertsGroupEntity, filter); toReturn = true; } return toReturn; }
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; }
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; }
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; }
public AdvertsGroupEntity Insert(AdvertsGroupEntity _AdvertsGroupEntity) { using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { adapter.SaveEntity(_AdvertsGroupEntity, true); } return _AdvertsGroupEntity; }