Code:
/ 4.0 / 4.0 / 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. //---------------------------------------------------------------------- //// 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
- recordstate.cs
- NominalTypeEliminator.cs
- LinearGradientBrush.cs
- PreviewPageInfo.cs
- XPathDocumentBuilder.cs
- GenericEnumerator.cs
- DataGridTablesFactory.cs
- DBSchemaTable.cs
- ByteStack.cs
- XmlWriterTraceListener.cs
- NavigationProperty.cs
- MemberDomainMap.cs
- TextComposition.cs
- PreProcessInputEventArgs.cs
- MemberInitExpression.cs
- TextTreeInsertUndoUnit.cs
- MediaElement.cs
- ListItemCollection.cs
- NativeCppClassAttribute.cs
- DataGridTable.cs
- SqlConnectionManager.cs
- Base64Stream.cs
- SingleAnimationUsingKeyFrames.cs
- EngineSite.cs
- OleDbParameterCollection.cs
- RevocationPoint.cs
- QfeChecker.cs
- ReliableMessagingHelpers.cs
- GetPageCompletedEventArgs.cs
- ColumnCollection.cs
- SafeHGlobalHandleCritical.cs
- MaterialCollection.cs
- GroupPartitionExpr.cs
- StructuralObject.cs
- Gdiplus.cs
- BindingExpression.cs
- ImportContext.cs
- DictationGrammar.cs
- ApplicationFileParser.cs
- NotSupportedException.cs
- XmlSchemaValidator.cs
- SafeEventLogReadHandle.cs
- PkcsMisc.cs
- IconBitmapDecoder.cs
- HyperLinkField.cs
- XPathNodeHelper.cs
- SelectionItemProviderWrapper.cs
- Authorization.cs
- TargetConverter.cs
- SoapHeaders.cs
- Separator.cs
- formatstringdialog.cs
- StateMachineHistory.cs
- XmlWhitespace.cs
- UserPreferenceChangedEventArgs.cs
- SamlAudienceRestrictionCondition.cs
- XmlSchemaSimpleTypeList.cs
- CodeNamespace.cs
- PhysicalAddress.cs
- ToolStripItemCollection.cs
- BindingList.cs
- CheckBoxDesigner.cs
- TerminateDesigner.cs
- AuthenticationConfig.cs
- ReceiveReply.cs
- WSTrust.cs
- SamlConstants.cs
- OpacityConverter.cs
- IteratorFilter.cs
- CharConverter.cs
- SaveFileDialog.cs
- CompilerCollection.cs
- WebPartDisplayModeCollection.cs
- DataGridTablesFactory.cs
- PathSegment.cs
- OrderByBuilder.cs
- ExceptionUtil.cs
- ProcessThread.cs
- ImageListUtils.cs
- WizardPanel.cs
- CriticalFinalizerObject.cs
- Constraint.cs
- BitConverter.cs
- TypeProvider.cs
- WithParamAction.cs
- ConfigurationManagerHelperFactory.cs
- IISUnsafeMethods.cs
- BindingValueChangedEventArgs.cs
- EffectiveValueEntry.cs
- RichTextBox.cs
- JoinElimination.cs
- HostProtectionPermission.cs
- SortableBindingList.cs
- VisualBrush.cs
- SafeFileHandle.cs
- SynchronizedChannelCollection.cs
- TextMarkerSource.cs
- VScrollProperties.cs
- DbProviderFactory.cs
- XmlSchemaSubstitutionGroup.cs