Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Objects / Internal / EntityWithKeyStrategy.cs / 1305376 / EntityWithKeyStrategy.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 entities that implement IEntityWithKey. Getting and setting /// the key is deferred to the entity itself. /// internal sealed class EntityWithKeyStrategy : IEntityKeyStrategy { private IEntityWithKey _entity; ////// Creates a strategy object for the given entity. Keys will be stored in the entity. /// /// The entity to use public EntityWithKeyStrategy(IEntityWithKey entity) { _entity = entity; } // See IEntityKeyStrategy public EntityKey GetEntityKey() { return _entity.EntityKey; } // See IEntityKeyStrategy public void SetEntityKey(EntityKey key) { _entity.EntityKey = key; } // See IEntityKeyStrategy public EntityKey GetEntityKeyFromEntity() { return _entity.EntityKey; } } } // 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
- PeerToPeerException.cs
- SourceInterpreter.cs
- cookieexception.cs
- Rfc2898DeriveBytes.cs
- IntersectQueryOperator.cs
- OutputCacheProfileCollection.cs
- RegexRunner.cs
- MutexSecurity.cs
- CloseSequence.cs
- EventData.cs
- ColorMatrix.cs
- InternalConfigRoot.cs
- StandardOleMarshalObject.cs
- TypeSystemProvider.cs
- DataKeyArray.cs
- LinqMaximalSubtreeNominator.cs
- EntityDataSourceDataSelectionPanel.cs
- Pointer.cs
- OleDbEnumerator.cs
- HttpCacheParams.cs
- ReliableDuplexSessionChannel.cs
- AssemblyBuilder.cs
- EasingKeyFrames.cs
- FrameworkElement.cs
- SecurityDocument.cs
- BitmapInitialize.cs
- BinaryWriter.cs
- CodeAttributeDeclarationCollection.cs
- CodeMemberMethod.cs
- Hex.cs
- StyleSheetRefUrlEditor.cs
- QueryOutputWriter.cs
- FieldBuilder.cs
- ImageAttributes.cs
- PropertyToken.cs
- ComponentConverter.cs
- DnsPermission.cs
- DropDownList.cs
- ToolStripOverflow.cs
- SingleQueryOperator.cs
- CorrelationResolver.cs
- StylusCaptureWithinProperty.cs
- TabRenderer.cs
- DesignerSerializerAttribute.cs
- contentDescriptor.cs
- FormParameter.cs
- CommandField.cs
- ServiceModelActivationSectionGroup.cs
- Light.cs
- XsdBuildProvider.cs
- RefreshPropertiesAttribute.cs
- EventListenerClientSide.cs
- DbParameterCollectionHelper.cs
- TypeNameConverter.cs
- TextServicesHost.cs
- XmlParserContext.cs
- TabControlCancelEvent.cs
- TypeBrowser.xaml.cs
- CodeIdentifier.cs
- SizeAnimation.cs
- DataPagerFieldCommandEventArgs.cs
- SQLGuidStorage.cs
- MeshGeometry3D.cs
- ToolboxBitmapAttribute.cs
- UIAgentCrashedException.cs
- PersonalizationProviderHelper.cs
- NetNamedPipeBindingElement.cs
- FormsAuthenticationUserCollection.cs
- PatternMatcher.cs
- PublishLicense.cs
- UpdatableGenericsFeature.cs
- ClientScriptManager.cs
- AttributeEmitter.cs
- URLIdentityPermission.cs
- IsolatedStoragePermission.cs
- DrawingCollection.cs
- PackageRelationshipCollection.cs
- _NTAuthentication.cs
- MetadataItemCollectionFactory.cs
- PropertyCollection.cs
- DataGridViewColumnStateChangedEventArgs.cs
- PartialCachingAttribute.cs
- DeclarativeCatalogPart.cs
- CSharpCodeProvider.cs
- FormViewRow.cs
- ToolStripArrowRenderEventArgs.cs
- Cloud.cs
- CompiledXpathExpr.cs
- DecoderExceptionFallback.cs
- LabelLiteral.cs
- BoolLiteral.cs
- MemberDescriptor.cs
- ParallelActivityDesigner.cs
- SignedPkcs7.cs
- UnsafePeerToPeerMethods.cs
- MethodSignatureGenerator.cs
- PolicyException.cs
- XPathDocument.cs
- keycontainerpermission.cs
- WebPartsPersonalization.cs