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
- WebBaseEventKeyComparer.cs
- SchemaCollectionCompiler.cs
- RequestSecurityTokenForGetBrowserToken.cs
- CodeDOMProvider.cs
- DecoderExceptionFallback.cs
- Environment.cs
- BamlBinaryReader.cs
- VisualStyleElement.cs
- OutputScopeManager.cs
- storepermission.cs
- SharedPerformanceCounter.cs
- DataSourceConverter.cs
- ApplicationGesture.cs
- ButtonBase.cs
- Translator.cs
- UnhandledExceptionEventArgs.cs
- ScrollChangedEventArgs.cs
- UInt64Converter.cs
- HttpHandlerAction.cs
- TypedElement.cs
- ImageIndexConverter.cs
- XmlFormatExtensionAttribute.cs
- SmtpFailedRecipientException.cs
- SByteConverter.cs
- DynamicRendererThreadManager.cs
- FontNamesConverter.cs
- ReadOnlyTernaryTree.cs
- WebPartCatalogCloseVerb.cs
- XamlStyleSerializer.cs
- CellParaClient.cs
- Knowncolors.cs
- HostingEnvironmentException.cs
- MessageEventSubscriptionService.cs
- ComponentResourceManager.cs
- InlineCollection.cs
- SecurityDocument.cs
- Debugger.cs
- PermissionRequestEvidence.cs
- XPathMultyIterator.cs
- BitmapCacheBrush.cs
- CompensationHandlingFilter.cs
- LogAppendAsyncResult.cs
- TextSpan.cs
- ParentUndoUnit.cs
- TextRunProperties.cs
- PeerCollaborationPermission.cs
- InkCanvas.cs
- SqlDataSourceEnumerator.cs
- KeyTime.cs
- TypeBuilder.cs
- ListViewItemSelectionChangedEvent.cs
- ProviderIncompatibleException.cs
- UrlAuthFailureHandler.cs
- ListBase.cs
- ExpanderAutomationPeer.cs
- ICspAsymmetricAlgorithm.cs
- TrustManagerPromptUI.cs
- Command.cs
- InvalidateEvent.cs
- Baml6ConstructorInfo.cs
- OracleCommandSet.cs
- NavigationService.cs
- SizeKeyFrameCollection.cs
- DataGridRowDetailsEventArgs.cs
- BaseDataList.cs
- CapiSymmetricAlgorithm.cs
- NativeMethods.cs
- Variant.cs
- View.cs
- AnnotationAuthorChangedEventArgs.cs
- ThicknessAnimationUsingKeyFrames.cs
- SchemaImporterExtension.cs
- ObsoleteAttribute.cs
- PrintControllerWithStatusDialog.cs
- DrawingAttributes.cs
- securitycriticaldataformultiplegetandset.cs
- EntityObject.cs
- XPathDescendantIterator.cs
- ColumnResult.cs
- InternalDuplexBindingElement.cs
- DesignerSerializerAttribute.cs
- PointIndependentAnimationStorage.cs
- metadatamappinghashervisitor.cs
- oledbmetadatacolumnnames.cs
- TargetInvocationException.cs
- EmptyCollection.cs
- Point3D.cs
- FtpRequestCacheValidator.cs
- PtsCache.cs
- DesignerSerializerAttribute.cs
- OdbcDataAdapter.cs
- SqlErrorCollection.cs
- PropertyFilterAttribute.cs
- TextRunTypographyProperties.cs
- milexports.cs
- HashHelper.cs
- Dump.cs
- SystemGatewayIPAddressInformation.cs
- Camera.cs
- ZipIOCentralDirectoryBlock.cs