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

separate the db table structure according the to the class library

3 Answers 52 Views
Getting Started
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Håkan
Top achievements
Rank 1
Håkan asked on 06 Aug 2012, 03:35 PM

Hi All,

If we create a table using openaccess, always the user is “dbo”.

Ex:
if we create a table called “customer” then db will appear  as dbo.customer

We need to separate the db table structure according the to the   class library that we are using

For ex: 

“Authentication”  class library there is a table called “Role_Type” and  “Warehouse” class library there is a  table called “Warehouse_Type”

In DB we need the table separation like.

Authentication. Role_Type

Warehouse. Warehouse_Type

How can we do this using openAccess.


Development Team

3 Answers, 1 is accepted

Sort by
0
Ady
Telerik team
answered on 08 Aug 2012, 07:53 AM
Hello Håkan,

 You can specify the schema name for a table so that the tables are created in separate schemas. You can do this in the 'Table editor' (right click a class and select 'Edit Table') or you can open the 'Model Schema Explorer' ( View->Other Windows->Model Schema Explorer), select the table in the 'Tables' folder, press F4 to open 'Properties' window and change the schema name there.

At the moment there is no way to specify the schema name for a bunch of tables but this is something we have already added to our list.

Do get back in case you need further assistance.

Regards,
Ady
the Telerik team
OpenAccess ORM Q2'12 Now Available! Get your hands on all the new stuff.
0
Håkan
Top achievements
Rank 1
answered on 10 Aug 2012, 07:50 AM
Hi


we forgot to tell that we use CODE FIRST METHOD  to create table.In this case how can we separate the Schema


Development Team 
0
Ady
Telerik team
answered on 10 Aug 2012, 12:10 PM
Hi Håkan,,

 It does not matter which approach you use, you can still specify the schema name the way I previously mentioned. In case you have not explicitly mapped your classes to tables, please select each class in the designer, right click and select 'Map to table'. This will map the class to a table and show the table definition in a dialog. Click 'Ok' to accept this default mapping.
You can then follow the steps mentioned previously to specify the schema name.
Once again, we are aware of the usability issues to perform this operation in a single step and we have already added that to your list.

Do get back in case you need further assistance.

All the best,
Ady
the Telerik team
OpenAccess ORM Q2'12 Now Available! Get your hands on all the new stuff.
Tags
Getting Started
Asked by
Håkan
Top achievements
Rank 1
Answers by
Ady
Telerik team
Håkan
Top achievements
Rank 1
Share this question
or