public bool Delete(string Id) { bool toReturn = false; using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { VideoTypeEntity _VideoTypeEntity = new VideoTypeEntity(Id); if (adapter.FetchEntity(_VideoTypeEntity)) { adapter.DeleteEntity(_VideoTypeEntity); toReturn = true; } } return toReturn; }
public bool Update(string Id, string TypeName, string ParentId) { bool toReturn = false; using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { VideoTypeEntity _VideoTypeEntity = new VideoTypeEntity(Id); if (adapter.FetchEntity(_VideoTypeEntity)) { _VideoTypeEntity.TypeName = TypeName; _VideoTypeEntity.ParentId = ParentId; adapter.SaveEntity(_VideoTypeEntity, true); toReturn = true; } } return toReturn; }
public bool Update(VideoTypeEntity _VideoTypeEntity, RelationPredicateBucket filter) { bool toReturn = false; using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { adapter.UpdateEntitiesDirectly(_VideoTypeEntity, filter); toReturn = true; } return toReturn; }
public bool Update(VideoTypeEntity _VideoTypeEntity) { bool toReturn = false; using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { RelationPredicateBucket filter = new RelationPredicateBucket(); IPredicateExpression _PredicateExpression = new PredicateExpression(); _PredicateExpression.Add(VideoTypeFields.Id == _VideoTypeEntity.Id); filter.PredicateExpression.Add(_PredicateExpression); adapter.UpdateEntitiesDirectly(_VideoTypeEntity, filter); toReturn = true; } return toReturn; }
public VideoTypeEntity SelectOne(string Id) { VideoTypeEntity toReturn = null; using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { VideoTypeEntity _VideoTypeEntity = new VideoTypeEntity(Id); if (adapter.FetchEntity(_VideoTypeEntity)) { toReturn = _VideoTypeEntity; } } return toReturn; }
public VideoTypeEntity Insert(string TypeName, string ParentId) { VideoTypeEntity _VideoTypeEntity = new VideoTypeEntity(); using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { _VideoTypeEntity.TypeName = TypeName; _VideoTypeEntity.ParentId = ParentId; adapter.SaveEntity(_VideoTypeEntity, true); } return _VideoTypeEntity; }
public VideoTypeEntity Insert(VideoTypeEntity _VideoTypeEntity) { using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { adapter.SaveEntity(_VideoTypeEntity, true); } return _VideoTypeEntity; }