/// <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); }
/// <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)); }
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)); }
public void Singularize_Address() { string singularAddress = Inflector.Singularize("address"); Assert.AreEqual("address", singularAddress); }
public string Singularize(string identifier) { return(Inflector.Singularize(identifier) ?? identifier); }