Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Objects / Internal / PocoEntityKeyStrategy.cs / 1305376 / PocoEntityKeyStrategy.cs
using System; using System.Collections.Generic; using System.Text; using System.Data; using System.Data.Objects.DataClasses; using System.Diagnostics; namespace System.Data.Objects.Internal { ////// Implementor of IEntityKeyStrategy for getting and setting a key on an entity that does not /// implement IEntityWithKey. The key is stored in the strategy object. /// internal sealed class PocoEntityKeyStrategy : IEntityKeyStrategy { private EntityKey _key; ////// Creates a new strategy object; no reference to the actual entity is required. /// public PocoEntityKeyStrategy() { } // See IEntityKeyStrategy public EntityKey GetEntityKey() { return _key; } // See IEntityKeyStrategy public void SetEntityKey(EntityKey key) { _key = key; } // See IEntityKeyStrategy public EntityKey GetEntityKeyFromEntity() { return null; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; using System.Collections.Generic; using System.Text; using System.Data; using System.Data.Objects.DataClasses; using System.Diagnostics; namespace System.Data.Objects.Internal { ////// Implementor of IEntityKeyStrategy for getting and setting a key on an entity that does not /// implement IEntityWithKey. The key is stored in the strategy object. /// internal sealed class PocoEntityKeyStrategy : IEntityKeyStrategy { private EntityKey _key; ////// Creates a new strategy object; no reference to the actual entity is required. /// public PocoEntityKeyStrategy() { } // See IEntityKeyStrategy public EntityKey GetEntityKey() { return _key; } // See IEntityKeyStrategy public void SetEntityKey(EntityKey key) { _key = key; } // See IEntityKeyStrategy public EntityKey GetEntityKeyFromEntity() { return null; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ArgumentNullException.cs
- MultiDataTrigger.cs
- DbCommandTree.cs
- TimeoutException.cs
- StorageComplexTypeMapping.cs
- RequestCachingSection.cs
- ListBoxItemAutomationPeer.cs
- TrackingStringDictionary.cs
- ParameterBinding.cs
- TableLayoutPanel.cs
- WebServiceFault.cs
- DataGridViewColumnHeaderCell.cs
- OleDbException.cs
- Grammar.cs
- CodeVariableReferenceExpression.cs
- WizardStepBase.cs
- DocumentPageView.cs
- ToolStripSplitStackLayout.cs
- OutOfProcStateClientManager.cs
- MessageSmuggler.cs
- SystemResourceHost.cs
- CustomAttributeBuilder.cs
- XmlProcessingInstruction.cs
- ServiceObjectContainer.cs
- HTMLTextWriter.cs
- DbConnectionHelper.cs
- OracleCommandBuilder.cs
- AuthenticationServiceManager.cs
- LineBreakRecord.cs
- DataGridViewCellCollection.cs
- SizeFConverter.cs
- TreeNodeCollectionEditor.cs
- Transform.cs
- PenCursorManager.cs
- ActivationArguments.cs
- XmlAttributeAttribute.cs
- TypedTableBase.cs
- TimeSpanConverter.cs
- MemberInitExpression.cs
- ProtectedConfiguration.cs
- WebServiceReceive.cs
- JapaneseCalendar.cs
- ImagingCache.cs
- ProgressBarBrushConverter.cs
- LineSegment.cs
- BasePropertyDescriptor.cs
- ObjectStateEntry.cs
- NumberEdit.cs
- HttpProtocolReflector.cs
- VerticalAlignConverter.cs
- NullableFloatSumAggregationOperator.cs
- SqlStatistics.cs
- StatusBarItem.cs
- ByteBufferPool.cs
- DbDeleteCommandTree.cs
- TabControlAutomationPeer.cs
- ImageField.cs
- XmlSerializerFactory.cs
- CachedPathData.cs
- InvalidComObjectException.cs
- SaveFileDialog.cs
- Attribute.cs
- CollectionDataContractAttribute.cs
- StaticResourceExtension.cs
- TypeBrowserDialog.cs
- GroupByQueryOperator.cs
- IQueryable.cs
- FontClient.cs
- ContentPlaceHolder.cs
- HandleCollector.cs
- SurrogateEncoder.cs
- TrustLevel.cs
- WebSysDisplayNameAttribute.cs
- GifBitmapEncoder.cs
- RectKeyFrameCollection.cs
- FontInfo.cs
- HighlightOverlayGlyph.cs
- GraphicsPathIterator.cs
- ArrayList.cs
- ExtensionQuery.cs
- UInt64Converter.cs
- MatrixAnimationBase.cs
- TextStore.cs
- ConstructorNeedsTagAttribute.cs
- HttpCapabilitiesBase.cs
- URI.cs
- ExpressionBindingsDialog.cs
- Int16KeyFrameCollection.cs
- RotationValidation.cs
- DbDataAdapter.cs
- TransactionFilter.cs
- StagingAreaInputItem.cs
- AttachedPropertyInfo.cs
- IApplicationTrustManager.cs
- XPathDocumentIterator.cs
- DictionaryEntry.cs
- ErrorStyle.cs
- DataGridViewImageColumn.cs
- CompilationLock.cs
- ChangeNode.cs