Subsonic - How to use SQL Schema / Owner name as part of the namespace?
Posted
by CResults
on Stack Overflow
See other posts from Stack Overflow
or by CResults
Published on 2009-04-16T07:21:54Z
Indexed on
2010/04/27
3:03 UTC
Read the original article
Hit count: 439
Hi there,
I've just started using Subsonic 2.2 and so far very impressed - think it'll save me some serious coding time.
Before I dive into using it full time though there is something bugging me that I'd like to sort out.
In my current database (a SQL2008 db) I have split the tables, views, sps etc. up into separate chunks by schema/owner name, so all the customer tables are in the customer. schema, products in the product. schema etc., so a to select from the customers address table i'd do a select * from customer.address
Unfortunately, Subsonic ignores the schema/owner name and just gives me the base table name. This is fine as I've no duplicates between schemas (e.g Customer.Address and Supplier.Address don't both exist) but I just feel the code could be clearer if I could split by schema.
Ideally I'd like to be able to alter the namespace by schema/owner - I think this would have least impact on SubSonic yet make the resulting code easier to read.
Problem is, I've crawled all over the Subsonic source and don't have a clue how to do this (doesn't help that I code in VB not C# = yes I know, blame the ZX Spectrum!!)
If anyone has tackled this before or has an idea on how to solve it, I'd be really grateful,
Thanks in advance.
Ed
© Stack Overflow or respective owner