Copied to clipboard

Flag this post as spam?

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


  • Nadine Fisch 159 posts 429 karma points
    May 30, 2018 @ 11:59
    Nadine Fisch
    0

    Using PetaPoco and compiling source code?

    Hi,

    I've managed to run my site on my local machine yay. I am one step before my last aim: creating controllers and models and database tables with peta poco :)

    So, I added a controller folder, a modules folder and coded the required Attributes for the model. I also created a Startup.cs that checks if my table already exists and if not, then it will create in the database.

    So I just restarted IISExpress, but the table hasn't been deployed. So I think I have to rebuild the code, because of the new cs-files?

    I am using Visul Studio Code and I don't know what to do to "rebuild" the source code? Can anyone please explain me this step?

    Thank you ;)

  • Dave Woestenborghs 3504 posts 12134 karma points MVP 9x admin c-trib
    May 30, 2018 @ 12:39
    Dave Woestenborghs
    101

    Hey Nadine,

    Does it work if you move your cs files in to a App_Code folder.

    Dave

  • Nadine Fisch 159 posts 429 karma points
    May 30, 2018 @ 12:42
    Nadine Fisch
    0

    Hey Dave, I found exactliy this advice here https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/53132-Using-Surface-Controllers-with-Umbraco-7-#comment-184791

    :)

    Yes, now Umbraco recognize my code, now I have to adjust it to work correctly. Thank you very much!

  • Nadine Fisch 159 posts 429 karma points
    Jun 01, 2018 @ 08:08
    Nadine Fisch
    0

    it suffices to restart IIS server, so the code is recompiled

Please Sign in or register to post replies

Write your reply to:

Draft