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
- AnnotationResourceChangedEventArgs.cs
- ButtonFlatAdapter.cs
- Component.cs
- Wildcard.cs
- Oid.cs
- LinqDataSourceDisposeEventArgs.cs
- PolyQuadraticBezierSegment.cs
- ListViewDeleteEventArgs.cs
- CompilerScopeManager.cs
- ControllableStoryboardAction.cs
- ListViewDeletedEventArgs.cs
- ButtonFlatAdapter.cs
- SqlDataSourceStatusEventArgs.cs
- StringAnimationBase.cs
- NativeMsmqMessage.cs
- StaticSiteMapProvider.cs
- XamlFigureLengthSerializer.cs
- TrackBar.cs
- XhtmlBasicLiteralTextAdapter.cs
- SoapEnvelopeProcessingElement.cs
- ClientBase.cs
- XmlSchemaParticle.cs
- PlatformCulture.cs
- RegexMatchCollection.cs
- unsafenativemethodsother.cs
- Package.cs
- XmlSchemaNotation.cs
- PrintPreviewControl.cs
- KerberosSecurityTokenProvider.cs
- BoolLiteral.cs
- ServiceInstanceProvider.cs
- SynchronizationContext.cs
- SafeCoTaskMem.cs
- CreateParams.cs
- DocumentViewerBase.cs
- DurableInstanceProvider.cs
- FactoryId.cs
- SystemBrushes.cs
- DataGridHelper.cs
- DefaultParameterValueAttribute.cs
- XmlHierarchyData.cs
- BuildProvidersCompiler.cs
- HtmlControl.cs
- PeerApplication.cs
- CommandLibraryHelper.cs
- FactoryRecord.cs
- PersistChildrenAttribute.cs
- RadioButton.cs
- ClosableStream.cs
- QilFactory.cs
- Byte.cs
- IItemContainerGenerator.cs
- DiscardableAttribute.cs
- NonParentingControl.cs
- NetTcpSection.cs
- NotFiniteNumberException.cs
- ChannelBinding.cs
- Transform3DGroup.cs
- DeviceContext.cs
- ConfigXmlElement.cs
- RawStylusInputReport.cs
- XmlConvert.cs
- PeerNameResolver.cs
- StructuredProperty.cs
- InheritedPropertyChangedEventArgs.cs
- CanonicalFormWriter.cs
- ConditionalAttribute.cs
- CroppedBitmap.cs
- SingleObjectCollection.cs
- XPathAncestorIterator.cs
- WarningException.cs
- DocumentOrderQuery.cs
- ComboBoxRenderer.cs
- MachineKeySection.cs
- AsnEncodedData.cs
- PreProcessor.cs
- ChannelDispatcherBase.cs
- StrokeNodeData.cs
- UdpRetransmissionSettings.cs
- FixedSOMTable.cs
- XmlExceptionHelper.cs
- MultiPageTextView.cs
- NetPipeSection.cs
- Pair.cs
- HostExecutionContextManager.cs
- ListControl.cs
- IISMapPath.cs
- Command.cs
- DesignBindingValueUIHandler.cs
- VariableQuery.cs
- DbExpressionRules.cs
- Range.cs
- BrowserTree.cs
- SuppressMessageAttribute.cs
- ElementProxy.cs
- HostProtectionPermission.cs
- Rights.cs
- MTConfigUtil.cs
- TransactionManagerProxy.cs
- WebPartUtil.cs