Is it possible to access the Umbraco DataContext (I.E SQL connection) ?
Hi there
I am doing some LINQ2SQL, as I have a pretty unique DB schema I'd like to stay out of the Umbraco system (I.E using Nodes & properties to store this particular data) I'm trying to link my C# classes to the DB tables using E.G
You can access sql helpers in umbraco.BusinessLogic.Application.SqlHelper located in buisnesslogic.dll, the rest of the data things are in umbraco.datalayer.dll
Hope this helps, H.
As note I used Simple.Data,
https://github.com/markrendle/Simple.Data, for the last project. Simple.data works great with
umbraco 4.6 and sql compact 4. I had a very simple schema for my
non-umbraco data, not sure how suitable this will be for more advanced
schemas.
Is it possible to access the Umbraco DataContext (I.E SQL connection) ?
Hi there
I am doing some LINQ2SQL, as I have a pretty unique DB schema I'd like to stay out of the Umbraco system (I.E using Nodes & properties to store this particular data)
I'm trying to link my C# classes to the DB tables using E.G
"Table<Customer> Customers = db.GetTable<Customer>();"
but I first need to setup a DataContext db = new DataContext();
As I'm already connected to the DB with Umbraco, is it possible to grab that DataContext instead of creating a new one?
Thanks any help appreciated! :)
Hi,
umbraco use old style queries and execute*.
You can access sql helpers in umbraco.BusinessLogic.Application.SqlHelper located in buisnesslogic.dll, the rest of the data things are in umbraco.datalayer.dll
Hope this helps,
H.
As note I used Simple.Data, https://github.com/markrendle/Simple.Data, for the last project. Simple.data works great with umbraco 4.6 and sql compact 4. I had a very simple schema for my non-umbraco data, not sure how suitable this will be for more advanced schemas.
is working on a reply...