Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntityDesign / Design / System / Data / Entity / Design / PluralizationService / EntityDesignPluralizationHandler.cs / 1305376 / EntityDesignPluralizationHandler.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Text; using System.Globalization; using System.Data.Entity.Design.PluralizationServices; using System.Data.Metadata.Edm; using System.IO; using System.Data.Entity.Design.SsdlGenerator; using System.Data.Entity.Design.Common; using System.Diagnostics; namespace System.Data.Entity.Design { internal class EntityDesignPluralizationHandler { ////// user might set the service to null, so we have to check the null when using this property /// internal PluralizationService Service { get; set; } ////// Handler for pluralization service in Entity Design /// /// overall switch for the service, the service only start working when the value is true /// /// internal EntityDesignPluralizationHandler(PluralizationService service) { this.Service = service; } internal string GetEntityTypeName(string storeTableName) { return this.Service != null ? this.Service.Singularize(storeTableName) : storeTableName; } internal string GetEntitySetName(string storeTableName) { return this.Service != null ? this.Service.Pluralize(storeTableName) : storeTableName; } internal string GetNavigationPropertyName(AssociationEndMember toEnd, string storeTableName) { if (this.Service != null) { return toEnd.RelationshipMultiplicity == RelationshipMultiplicity.Many ? this.Service.Pluralize(storeTableName) : this.Service.Singularize(storeTableName); } else { return storeTableName; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WebConfigurationFileMap.cs
- TypeGeneratedEventArgs.cs
- ZipArchive.cs
- RecognitionResult.cs
- ObjectDisposedException.cs
- XmlAnyElementAttribute.cs
- EntityTransaction.cs
- GridViewColumnHeaderAutomationPeer.cs
- IHttpResponseInternal.cs
- EditorZone.cs
- AncestorChangedEventArgs.cs
- DbConnectionPoolGroup.cs
- MobileContainerDesigner.cs
- ExternalException.cs
- grammarelement.cs
- BinaryObjectWriter.cs
- QuadraticBezierSegment.cs
- EmptyElement.cs
- PerspectiveCamera.cs
- QueryExpression.cs
- FixUp.cs
- Switch.cs
- DiscreteKeyFrames.cs
- SizeAnimationUsingKeyFrames.cs
- TextBreakpoint.cs
- SecurityProtocol.cs
- AutomationPropertyInfo.cs
- XPathCompileException.cs
- ApplicationProxyInternal.cs
- CompressStream.cs
- JavaScriptSerializer.cs
- BasicExpandProvider.cs
- ClientSideProviderDescription.cs
- ValueSerializerAttribute.cs
- SystemColors.cs
- XsltContext.cs
- FamilyMap.cs
- PasswordDeriveBytes.cs
- DuplicateWaitObjectException.cs
- ConnectionManagementElementCollection.cs
- CacheMemory.cs
- ProcessHost.cs
- UrlMappingCollection.cs
- XMLDiffLoader.cs
- TextServicesLoader.cs
- SortedList.cs
- AxHost.cs
- Rules.cs
- NetStream.cs
- Matrix3D.cs
- MailDefinition.cs
- DialogBaseForm.cs
- DoubleStorage.cs
- ToolStripPanel.cs
- Panel.cs
- DataGridViewComponentPropertyGridSite.cs
- WorkingDirectoryEditor.cs
- regiisutil.cs
- _IPv4Address.cs
- BitmapPalette.cs
- HasCopySemanticsAttribute.cs
- TextEndOfLine.cs
- XappLauncher.cs
- IsolatedStorage.cs
- WindowCollection.cs
- ProxyManager.cs
- LoadedEvent.cs
- HtmlFormWrapper.cs
- DefaultValueConverter.cs
- HtmlEmptyTagControlBuilder.cs
- MethodImplAttribute.cs
- CustomAttributeBuilder.cs
- NamespaceInfo.cs
- ElementFactory.cs
- CodeMethodReturnStatement.cs
- DockProviderWrapper.cs
- NavigationExpr.cs
- MultitargetingHelpers.cs
- PtsCache.cs
- DataControlFieldCollection.cs
- ComponentFactoryHelpers.cs
- ObjectPropertyMapping.cs
- DbTransaction.cs
- UpdateException.cs
- DataGridViewRowPrePaintEventArgs.cs
- Emitter.cs
- OpacityConverter.cs
- ListViewGroupItemCollection.cs
- ObjectDataSource.cs
- MaterialGroup.cs
- FileDialog_Vista.cs
- MarkerProperties.cs
- QueryResponse.cs
- ToolStripContainer.cs
- BitmapEffect.cs
- Int32CollectionValueSerializer.cs
- HWStack.cs
- DirectoryNotFoundException.cs
- ByteStreamMessageEncodingElement.cs
- ModelUIElement3D.cs