Exemplo n.º 1
0
        private string GetTableName(dynamic querySpec)
        {
            string table = ReflectionExtensions.Property <string>(querySpec, "from", false) ??
                           ReflectionExtensions.Property <string>(querySpec, "From", false) ??
                           ReflectionExtensions.Property <string>(querySpec, "Type", false) ??
                           ReflectionExtensions.Property <string>(querySpec, "type", false) ??
                           ReflectionExtensions.Property <string>(querySpec, "Table", false) ??
                           ReflectionExtensions.Property <string>(querySpec, "TableName", false) ??
                           ReflectionExtensions.Property <string>(querySpec, "table", false) ??
                           ReflectionExtensions.Property <string>(querySpec, "tableName", false) ??
                           ReflectionExtensions.Property <string>(querySpec, "Class", false) ??
                           ReflectionExtensions.Property <string>(querySpec, "ClassName", false) ??
                           ReflectionExtensions.Property <string>(querySpec, "className", false);

            Args.ThrowIfNullOrEmpty(table, "From/Table/Class not specified");
            table = NameMap.GetTableName(table);
            return(table);
        }