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
- ApplicationGesture.cs
- DesignerTransactionCloseEvent.cs
- OleAutBinder.cs
- MethodCallConverter.cs
- GridLength.cs
- MD5CryptoServiceProvider.cs
- MembershipAdapter.cs
- Unit.cs
- ChtmlFormAdapter.cs
- StatusBar.cs
- ButtonChrome.cs
- SafeNativeMethods.cs
- ArrangedElement.cs
- AddingNewEventArgs.cs
- CustomPopupPlacement.cs
- XmlBufferReader.cs
- BaseProcessor.cs
- WebFormsRootDesigner.cs
- DeferredBinaryDeserializerExtension.cs
- WebSysDescriptionAttribute.cs
- SiteMembershipCondition.cs
- ToolStripArrowRenderEventArgs.cs
- SoapRpcMethodAttribute.cs
- GenericEnumerator.cs
- XmlEventCache.cs
- XPathAncestorQuery.cs
- XmlValidatingReader.cs
- RectIndependentAnimationStorage.cs
- XmlSchemaException.cs
- InstancePersistenceEvent.cs
- StreamReader.cs
- WindowCollection.cs
- ToolStripMenuItemCodeDomSerializer.cs
- XmlEventCache.cs
- ToolboxComponentsCreatedEventArgs.cs
- Transform3D.cs
- PagerSettings.cs
- Screen.cs
- XmlSerializerOperationFormatter.cs
- SQLInt16.cs
- XPathNodeHelper.cs
- CustomWebEventKey.cs
- ContentControl.cs
- PageParser.cs
- SegmentInfo.cs
- PartManifestEntry.cs
- DataObjectEventArgs.cs
- StylusOverProperty.cs
- StaticResourceExtension.cs
- KnownBoxes.cs
- SecurityCriticalDataForSet.cs
- SmtpNtlmAuthenticationModule.cs
- GenericEnumConverter.cs
- ForceCopyBuildProvider.cs
- ExternalException.cs
- MultiDataTrigger.cs
- Atom10FormatterFactory.cs
- TextSpanModifier.cs
- RestHandlerFactory.cs
- AbstractSvcMapFileLoader.cs
- _SslSessionsCache.cs
- ConfigXmlDocument.cs
- SafeEventLogWriteHandle.cs
- AddInIpcChannel.cs
- ConnectionStringsExpressionBuilder.cs
- SignedXml.cs
- DataGridTableCollection.cs
- WebReferencesBuildProvider.cs
- FileDataSourceCache.cs
- Pkcs7Recipient.cs
- ItemsPanelTemplate.cs
- DesignerProperties.cs
- SerTrace.cs
- XhtmlMobileTextWriter.cs
- StaticExtension.cs
- PasswordRecoveryDesigner.cs
- SatelliteContractVersionAttribute.cs
- nulltextnavigator.cs
- DeclaredTypeValidator.cs
- DataGridViewCellStyle.cs
- ListSourceHelper.cs
- StrongNameKeyPair.cs
- SectionXmlInfo.cs
- ExtenderProvidedPropertyAttribute.cs
- XmlNodeChangedEventManager.cs
- TraceContextRecord.cs
- ChangeInterceptorAttribute.cs
- MetadataArtifactLoaderCompositeResource.cs
- Annotation.cs
- DataPagerFieldCommandEventArgs.cs
- XamlStyleSerializer.cs
- RichTextBoxContextMenu.cs
- ChtmlTextWriter.cs
- input.cs
- DataGridViewColumn.cs
- DataTransferEventArgs.cs
- Inflater.cs
- ObsoleteAttribute.cs
- CompilerGeneratedAttribute.cs
- DataRowComparer.cs