Copied to clipboard

Flag this post as spam?

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


  • J 445 posts 862 karma points
    Mar 01, 2022 @ 12:40
    J
    0

    I would like to introduce Autofac and after reading some of Umbraco 8 documentation it seems there is already one built in.

    Would this mean Autofac is not supported or could i still use it?

    Anyone used Autofac with Umbraco 8 before?

  • Yakov Lebski 553 posts 2117 karma points
    Mar 01, 2022 @ 13:27
    Yakov Lebski
    1

    Umbraco 8 uses LightInject, I think the easiest and simplest way is to migrate using LightInject

  • J 445 posts 862 karma points
    Mar 01, 2022 @ 14:23
    J
    0

    @Yakov Lebski Thanks i will look into that.

    If i have 2 class libraries (one for a custom section and another for models and controllers) and one web project, would LightInject sit within the Web project or is there a preferred way to store these dependencies?

  • Yakov Lebski 553 posts 2117 karma points
    Mar 02, 2022 @ 05:02
    Yakov Lebski
    1

    The class library just use interfaces/implementation, you need to register it in web project

  • J 445 posts 862 karma points
    Mar 02, 2022 @ 09:59
    J
    0

    Ok, so adding the App_Code folder with the code to register would do the trick?

  • Yakov Lebski 553 posts 2117 karma points
    Mar 02, 2022 @ 12:09
    Yakov Lebski
    100

    Yes, please see documentation for it

Please Sign in or register to post replies

Write your reply to:

Draft