Code review: Umbraco 5.x - Create instance of HiveManager from another application
Hello,
I finally managed to create an instance of HiveManager from another application (in my case it's console application). I used Umbraco unit tests as a source of information how it works and how it should be setup.
It works and it reads data from database and display data to me, but I understand only 20% of the code I created.
If somebody have a deep knowledge in Umbraco 5.x API, could you please review my code and give some feedback - am I doing it right way, what I have to change, what I can improve?
I posted whole application source code and explanation what I understand there:
Very nice Alex, thanks alot for posting this. I used your project as is and added a SqlCe database from a site, worked nice.
I added a Umbraco.sdf from a test-site I had + reference to the sqlce 4 dll. For some reason I'm not really sure I had to reference to the explicit version in web config, so here's what it finally turned out looking like:
Code review: Umbraco 5.x - Create instance of HiveManager from another application
Hello,
I finally managed to create an instance of HiveManager from another application (in my case it's console application). I used Umbraco unit tests as a source of information how it works and how it should be setup.
It works and it reads data from database and display data to me, but I understand only 20% of the code I created.
If somebody have a deep knowledge in Umbraco 5.x API, could you please review my code and give some feedback - am I doing it right way, what I have to change, what I can improve?
I posted whole application source code and explanation what I understand there:
How to create instance of HiveManager
Thanks,
Alexander
http://yaplex.com/
And also the code if you don't want to download it:
Very nice Alex, thanks alot for posting this. I used your project as is and added a SqlCe database from a site, worked nice.
I added a Umbraco.sdf from a test-site I had + reference to the sqlce 4 dll. For some reason I'm not really sure I had to reference to the explicit version in web config, so here's what it finally turned out looking like:
<?xml version="1.0"?> <configuration> <connectionStrings> <add name="DatabaseConnString" connectionString="Data Source=Umbraco.sdf" providerName="System.Data.SqlServerCe.4.0" /> </connectionStrings> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> </startup> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <qualifyAssembly partialName="System.Data.SqlServerCe" fullName="System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/> </assemblyBinding> </runtime> </configuration>The Umbraco.sdf needs to be in the root and have "copy always" with this confs. Can obviously be set to a fixed path if one wants it to be kept as is.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.