Exemple #1
0
 /// <summary>
 /// Returns the singular form of a word.
 /// </summary>
 /// <param name="pluralWord">The plural form to singularise</param>
 /// <returns>The singular string of the word</returns>
 public static string Singularise(string pluralWord)
 {
     return(Inflector.Singularize(pluralWord));
 }
 public virtual string Singular(string value)
 {
     return(Inflector.Singularize(value));
 }
 static string GetNameOfJoiningTable(string lhsTableName, string rhsTableName)
 {
     return((Inflector.Singularize(lhsTableName) ?? lhsTableName) + (Inflector.Pluralize(rhsTableName) ?? rhsTableName));
 }
 public string Singularize(string name)
 {
     return(Inflector.Singularize(name) ?? name);
 }
Exemple #5
0
 /// <summary>
 /// Return the singular of a word.
 /// </summary>
 /// <param name="word">The plural form.</param>
 /// <returns>The singular form of <paramref name="word"/>.</returns>
 public static String Singularize(this String word)
 {
     return(Inflector.Singularize(word));
 }
Exemple #6
0
        public object QuackGet(string name, object[] parameters)
        {
            string entityName = Inflector.Singularize(name) ?? name;

            return(Query("from " + entityName));
        }
 public virtual string GetEntityNameFromTableName(string tableName)
 {
     return(Inflector.Pascalize(
                Inflector.Singularize(tableName.Trim('_'))
                ));
 }
 public string GetClassNameForCollectionComponent(string collectionTableName)
 {
     return(Inflector.Singularize(collectionTableName));
 }
Exemple #9
0
        public void Singularize_Address()
        {
            string singularAddress = Inflector.Singularize("address");

            Assert.AreEqual("address", singularAddress);
        }
 public string Singularize(string identifier)
 {
     return(Inflector.Singularize(identifier) ?? identifier);
 }