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
- XmlDataCollection.cs
- FixedSOMTable.cs
- Stack.cs
- connectionpool.cs
- XmlMemberMapping.cs
- LinearQuaternionKeyFrame.cs
- FormsAuthenticationTicket.cs
- DeferredElementTreeState.cs
- XmlSchemaNotation.cs
- ToolStripRendererSwitcher.cs
- CompositeActivityTypeDescriptor.cs
- Atom10FormatterFactory.cs
- IdnElement.cs
- EntityDescriptor.cs
- WebEventCodes.cs
- DataBindingCollection.cs
- FixedStringLookup.cs
- InternalConfigHost.cs
- LabelEditEvent.cs
- AppearanceEditorPart.cs
- TimeZone.cs
- AttributeData.cs
- DataTable.cs
- EncoderParameter.cs
- SQLMoney.cs
- Int64KeyFrameCollection.cs
- HtmlInputRadioButton.cs
- ControlType.cs
- Fonts.cs
- PasswordPropertyTextAttribute.cs
- BinaryKeyIdentifierClause.cs
- TypeProvider.cs
- XmlDataLoader.cs
- LockCookie.cs
- RoleManagerEventArgs.cs
- WebPartEditorCancelVerb.cs
- CalendarButton.cs
- AnnotationElement.cs
- TimeoutException.cs
- HttpHeaderCollection.cs
- Separator.cs
- MessageLoggingFilterTraceRecord.cs
- SelectionRange.cs
- ImageListUtils.cs
- GestureRecognizer.cs
- Serializer.cs
- ToolStripItemRenderEventArgs.cs
- DispatcherExceptionFilterEventArgs.cs
- FormatterServices.cs
- XmlSchemaType.cs
- __Filters.cs
- CqlGenerator.cs
- LambdaCompiler.Address.cs
- DataControlLinkButton.cs
- NativeMethods.cs
- HtmlPanelAdapter.cs
- ConfigXmlCDataSection.cs
- DataSourceCacheDurationConverter.cs
- RuntimeVariableList.cs
- XmlNodeChangedEventArgs.cs
- HGlobalSafeHandle.cs
- WinFormsSpinner.cs
- ReferenceService.cs
- ErrorRuntimeConfig.cs
- VideoDrawing.cs
- DetailsViewUpdateEventArgs.cs
- XPathScanner.cs
- TextFormatterImp.cs
- TemplateXamlParser.cs
- ClientScriptManager.cs
- DetailsViewRow.cs
- XsltCompileContext.cs
- CTreeGenerator.cs
- DataSourceHelper.cs
- UrlRoutingModule.cs
- CollectionViewGroup.cs
- ContextMenuStrip.cs
- ContainerParagraph.cs
- TextSelectionHelper.cs
- SettingsPropertyIsReadOnlyException.cs
- GridItemPattern.cs
- RightsManagementUser.cs
- StringFunctions.cs
- login.cs
- DataSourceControlBuilder.cs
- SafeRightsManagementEnvironmentHandle.cs
- HtmlGenericControl.cs
- RegistryHandle.cs
- Int32AnimationBase.cs
- XmlDictionaryReader.cs
- WsatServiceAddress.cs
- SchemaElement.cs
- XmlSchemaInfo.cs
- WebPartHeaderCloseVerb.cs
- keycontainerpermission.cs
- ImpersonationContext.cs
- LayoutEngine.cs
- ModelFunction.cs
- TreeWalkHelper.cs
- DbDataAdapter.cs