Last post Apr 01, 2011 07:16 AM by sjnaughton
Mar 31, 2011 09:16 AM|borutsla|LINK
How can I get the connectionstring on Edit page template? Probably some nested property of MetaTable object.
Mar 31, 2011 10:42 AM|sjnaughton|LINK
by connection strin do you mean the models connection string to the DB? and if so why? Adn no it's not stored in the metamodel sorry [:(]
Mar 31, 2011 11:45 AM|rishialagesan|LINK
can you be little elaborate on which context you are talking about?
Mar 31, 2011 07:50 PM|borutsla|LINK
I want to get connectionstring for the current selected linqtosql model. My application will have many models, and based on user login some model will be used.
Because I want to make some other query's later I have to get connectionstring for that model.
Apr 01, 2011 07:16 AM|sjnaughton|LINK
Hi Borutsla, although you can't get the connection string you can get the current data context from the MetaTable.
var context = Table.CreateContext();
Which you may need to cast to the context type you are using , unless you are building expression trees.