public bool Delete(Guid SessionId) { bool toReturn = false; using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { CartSessionEntity _CartSessionEntity = new CartSessionEntity(SessionId); if (adapter.FetchEntity(_CartSessionEntity)) { adapter.DeleteEntity(_CartSessionEntity); toReturn = true; } } return toReturn; }
public bool Update(Guid SessionId, string UserName, string UserIp, DateTime CreatedDate, bool IsSold) { bool toReturn = false; using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { CartSessionEntity _CartSessionEntity = new CartSessionEntity(SessionId); if (adapter.FetchEntity(_CartSessionEntity)) { _CartSessionEntity.UserName = UserName; _CartSessionEntity.UserIp = UserIp; _CartSessionEntity.CreatedDate = CreatedDate; _CartSessionEntity.IsSold = IsSold; adapter.SaveEntity(_CartSessionEntity, true); toReturn = true; } } return toReturn; }
public bool Update(CartSessionEntity _CartSessionEntity, RelationPredicateBucket filter) { bool toReturn = false; using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { adapter.UpdateEntitiesDirectly(_CartSessionEntity, filter); toReturn = true; } return toReturn; }
public bool Update(CartSessionEntity _CartSessionEntity) { bool toReturn = false; using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { RelationPredicateBucket filter = new RelationPredicateBucket(); IPredicateExpression _PredicateExpression = new PredicateExpression(); _PredicateExpression.Add(CartSessionFields.SessionId == _CartSessionEntity.SessionId); filter.PredicateExpression.Add(_PredicateExpression); adapter.UpdateEntitiesDirectly(_CartSessionEntity, filter); toReturn = true; } return toReturn; }
public CartSessionEntity SelectOne(Guid SessionId) { CartSessionEntity toReturn = null; using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { CartSessionEntity _CartSessionEntity = new CartSessionEntity(SessionId); if (adapter.FetchEntity(_CartSessionEntity)) { toReturn = _CartSessionEntity; } } return toReturn; }
public CartSessionEntity Insert(string UserName, string UserIp, DateTime CreatedDate, bool IsSold) { CartSessionEntity _CartSessionEntity = new CartSessionEntity(); using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { _CartSessionEntity.UserName = UserName; _CartSessionEntity.UserIp = UserIp; _CartSessionEntity.CreatedDate = CreatedDate; _CartSessionEntity.IsSold = IsSold; adapter.SaveEntity(_CartSessionEntity, true); } return _CartSessionEntity; }
public CartSessionEntity Insert(CartSessionEntity _CartSessionEntity) { using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { adapter.SaveEntity(_CartSessionEntity, true); } return _CartSessionEntity; }