Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Vitaly Vasilega 62 posts 184 karma points
    Feb 13, 2015 @ 06:17
    Vitaly Vasilega
    0

    Create custom tables and work with them.

    Hi everyone!

    I have scheduled a second project at the umbraco and I have a few questions that I would like to clarify.

    Create custom tables and work with them. In the first project we did not have time to figure out how to work with the custom tables using umbraco. Therefore, we used our own library for use with the custom tables. But recently I found a video that explains how to work with tables using umbraco accepts. In this video I did not like the need to write sql code directly in the cs file. Does Umbraco able to call stored procedures by name? Where can I find more information about UmbracoDatabase and everything related with it?
    Can you recommend a library that would be useful for working with custom tables?

    Thanks!

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Feb 13, 2015 @ 07:17
    Jan Skovgaard
    102

    Hi Vitaly

    The concept used in the video is PETAPOCO, which creates the database using a model class - You can read more about the PETAPOCO concept here http://www.toptensoftware.com/petapoco/

    Tim Geyssens have written about how to create custom sections and trees within Umbraco http://www.nibble.be/?p=440

    I don't know if there are any restrictions in order to be using stored procedures but I don't think so. If there is I can't see that it should be Umbraco related. Then it's more related to the way Microsoft defines their MVC stuff.

    If you login to the MSSQL server using the credentials from your web.config then you can see the Umbraco database and it's tables. For the custom sections you'll want to add new custom tables for your data in the Umbraco database. You could use an external database as well but the first mentioned is a wide used concept. But when you're following the steps Tim is using in his guide you don't need to think about the connection string since it's already setup in the web.config file - So the code already knows about it.

    A good ressource to learn more about Umbraco and MVC is http://umbraco.tv/, which is driven by the HQ and is around 19€ a month.

    There is also some more information about trees and sections here https://our.umbraco.org/documentation/Extending-Umbraco/Section-Trees/

    You maybe also want to learn about angularjs and Umbraco in conjunction with the custom trees etc. https://github.com/umbraco/AngularWorkbook/

    Hope this helps.

    /Jan

  • Vitaly Vasilega 62 posts 184 karma points
    Feb 13, 2015 @ 07:47
    Vitaly Vasilega
    0

    Hi Jan,

    Thank you for your response.

    Many of the links I've seen, but some links were new to me.

    Thanks!

    /Vitaly

Please Sign in or register to post replies

Write your reply to:

Draft