This is a migrated thread and some comments may be shown as answers.

Schema & Namespaces

1 Answer 80 Views
Data Access Free Edition
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Júlio César
Top achievements
Rank 1
Júlio César asked on 01 Apr 2012, 03:36 PM
There is an option to create our entities classes (tables) using the namespace from the database schemas (i.e. Schema.TableName maps to a class TableName on Schema namespace).

The problem: only the schema name are being used by the namespace. Example:

My project is called Project.Foo, so all my classes are inside Project.Foo namespace (or above).
The created entities are put on a folder with the same name of the database schema, but the namespace does not contains Project.Foo.Schema, only namespace Schema {}

How to fix it (besides editing the .rlinq xml by hand)?

1 Answer, 1 is accepted

Sort by
0
Viktor Zhivkov
Telerik team
answered on 05 Apr 2012, 07:30 AM
Hi Julio,

This is a known issue but there is a work around for it.
You can change the namespace of the domain classes using the Batch Operations Dialog (more about this dialog).
  1. Select all tables that belong to one schema in the grid.
  2. From the Operation combobox on the right select "Change Namespace".
  3. Write the new desired namespace in the New Namespace textbox.
  4. Press the Execute button to apply the change.
  5. Repeat steps from 1 to 4 for each schema.
  6. Save the .rlinq file to trigger the code generation.

If you update the model from the database the new tables (if any) will require the same process in order to have the desired namespace.
Changes inside tables won't affect the namespace and tables that have been already fixed using the method above will keep the setting between updates.

Sorry for the inconvenience caused.

Kind regards,
Viktor Zhivkov
the Telerik team
Want to use Telerik OpenAccess with SQL Azure? Download the trial version today. 
Tags
Data Access Free Edition
Asked by
Júlio César
Top achievements
Rank 1
Answers by
Viktor Zhivkov
Telerik team
Share this question
or