private static string GetCollectionTypeName(string entityTypeName)
{
// Disqualify the type name (e.g. Use String instead of System.String).
string prefix = entityTypeName;
int lastDot = entityTypeName.LastIndexOf('.');
if (lastDot >= 0 && ++lastDot < entityTypeName.Length)
{
prefix = entityTypeName.Substring(lastDot);
}
return string.Format("{0}Collection", prefix);
}