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
- PeerCollaborationPermission.cs
- XPathPatternBuilder.cs
- Transform3D.cs
- StringValidatorAttribute.cs
- ISAPIWorkerRequest.cs
- StackSpiller.Generated.cs
- HtmlTableRowCollection.cs
- GeneralTransform2DTo3DTo2D.cs
- SerializationSectionGroup.cs
- FtpWebResponse.cs
- FunctionMappingTranslator.cs
- DeviceContext.cs
- EntityFrameworkVersions.cs
- QilExpression.cs
- SQLByteStorage.cs
- XmlILModule.cs
- QilStrConcatenator.cs
- ThreadStaticAttribute.cs
- SpotLight.cs
- DataSourceCacheDurationConverter.cs
- Light.cs
- DefaultTraceListener.cs
- AutomationElementCollection.cs
- __ConsoleStream.cs
- FramingEncoders.cs
- ClientBuildManagerCallback.cs
- RawAppCommandInputReport.cs
- WindowsTokenRoleProvider.cs
- DependencyPropertyDescriptor.cs
- ValidationRuleCollection.cs
- LoginName.cs
- LoginName.cs
- RepeatInfo.cs
- WCFModelStrings.Designer.cs
- TypeListConverter.cs
- RTLAwareMessageBox.cs
- LinkConverter.cs
- Wizard.cs
- ComponentTray.cs
- SvcMapFileLoader.cs
- IArgumentProvider.cs
- MsmqIntegrationBinding.cs
- BaseDataListPage.cs
- httpserverutility.cs
- AddingNewEventArgs.cs
- ExtensionQuery.cs
- SafeLocalAllocation.cs
- configsystem.cs
- ObjRef.cs
- basemetadatamappingvisitor.cs
- MarginCollapsingState.cs
- ProgressBarHighlightConverter.cs
- CodeTypeReferenceExpression.cs
- DictionaryBase.cs
- ColorAnimationUsingKeyFrames.cs
- UnsafeNativeMethods.cs
- TimeSpanMinutesConverter.cs
- EntitySqlQueryBuilder.cs
- Utils.cs
- ObjectQueryExecutionPlan.cs
- PolyLineSegment.cs
- RecognizerInfo.cs
- LinqDataSourceDisposeEventArgs.cs
- FrameworkElementAutomationPeer.cs
- TreeNodeEventArgs.cs
- _ShellExpression.cs
- Endpoint.cs
- OleDbMetaDataFactory.cs
- ImageList.cs
- DataGridViewLinkColumn.cs
- XmlWrappingReader.cs
- CreateUserErrorEventArgs.cs
- WizardPanelChangingEventArgs.cs
- RegexRunner.cs
- SafeThreadHandle.cs
- FormViewInsertedEventArgs.cs
- _ListenerAsyncResult.cs
- StrongNamePublicKeyBlob.cs
- DockProviderWrapper.cs
- SingleStorage.cs
- WsdlBuildProvider.cs
- DoWorkEventArgs.cs
- ClientSettings.cs
- BindingExpressionBase.cs
- EditorPartChrome.cs
- ALinqExpressionVisitor.cs
- ExternalFile.cs
- AdCreatedEventArgs.cs
- ApplicationFileParser.cs
- FormatterConverter.cs
- Configuration.cs
- ImageField.cs
- LocalValueEnumerator.cs
- BitmapEffectDrawing.cs
- XsltException.cs
- TextElement.cs
- BooleanProjectedSlot.cs
- PasswordRecoveryDesigner.cs
- ImageDrawing.cs
- DetailsViewInsertedEventArgs.cs