I have 3 entities:
1. A database
2. Table which database has a collection of
3. Column which tables have a collection of
While lazy loading enabled = false
How do I return a json string containing each database, with an array of respective tables, each table with an array of respective columns?
UPDATE:
I have have been able to return the following Json script, at the cost of disabling instances on certain classes:

This is the return I am looking for. However, I had to line-out column’s relationship to table, and table’s to database in respective classes and I did not want to do that.
I did first try the [ScriptIgnore] annotation over the foreign classes but that did not work
With clarification that these are custom-created objects, I believe you are looking to use reflection. Specifically the PropertyInfo class which is returned from calling Object.GetType() will give you what you want. If you have an object graph of database objects with table child objects and column grandchild objects, you should iterate through the graph, calling GetType() on each to acquire information about the names and types if needed.
Reflection is not fast and performant, but it should get what you need.
If the objects you are referencing are from a database technology:
Look at Context.MetaDataWorkspace. Specifically look at .GetItems(). Here is a good example/demo showing you how to do it. Look at the ‘EntityTypes’ and ‘EntityTypes and Properties’ sections.
Excerpted code:
This will get you the list of tables and columns. You will not be able to get the list of databases on a given SQL server from an Entity context that is aware of only the items added to it and you do not add databases to a context.
I also just noticed you requested that you be able to return it in JSON; with the result set above, you should be able to loop through and either build the JSON by hand or construct an object that is serializable as JSON.