Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Alex
    @Apower952
    @DmitrySikorsky I needed to add SignalR and previously I would have just used Microsoft's Microsoft.AspNetCore.App package to reference it. Now that ExtCore runs on .NETStandard AspNetCore.App is not supported. So I was wondering if I would have to default back to using the startup but I manged to get around it. I just added the references to SignalR separate and all is working now.
    Nick Rimmer
    @NickRimmer
    @DmitrySikorsky hey! Is it possible to use ExtCore.Data (StorageContext) with UseInMemoryDatabase ( https://docs.microsoft.com/en-us/ef/core/miscellaneous/testing/in-memory#writing-tests )?
    Armarr
    @Armarr
    @NickRimmer You want to make your own implementation of ExtCore.Data.Abstractions.IStorageContext. Look at the existing implementations for inspiration https://github.com/ExtCore/ExtCore/blob/master/src/ExtCore.Data.EntityFramework.SqlServer/StorageContext.cs
    Nick Rimmer
    @NickRimmer
    I think same (=
    Dmitry Sikorsky
    @DmitrySikorsky
    @Apower952 yes, this is correct.
    just add a direct reference.
    Alex
    @Apower952
    @DmitrySikorsky - Yeah that's perfect, thanks
    Andrew Camilleri
    @Kukks
    Heya, cool project. Will try and use it in http://btcpayserver.org soon :)
    Andrew Camilleri
    @Kukks
    Was wondering, is it recommended to only use the ExtensionManager to load services or can I simply use the DI's service registration?
    Armarr
    @Armarr
    In our project we started off using ExtensionManager but are slowly migrating to using our DI (Autofac) more and more because of the extra features that provides (metadata and filtering). Currently we only use to for anything directly related to plugin discovery and initialization, once the site is running everything goes through the DI.
    We might end up not using the ExtensionManager at all in the future, it doesn't seem like it's required
    Andrew Camilleri
    @Kukks
    @Armarr Good to know, I came to that same conclusion
    Dmitry Sikorsky
    @DmitrySikorsky
    Hi @Kukks , DI should be used always when possible. ExtensionManager might be used to find existing implementation of some given interface to register it in the DI then: https://github.com/ExtCore/ExtCore/blob/master/src/ExtCore.Data/Actions/AddStorageAction.cs#L47
    Andrew Camilleri
    @Kukks

    @DmitrySikorsky Thanks, that's what I ended up doing. Now I'm running into issues with the embedded views in plugins. I have a few plugins that I've been working on in my local dev environment with the main app directly referencing them. The Views and Scripts are all embedded in the plugins. Everything seems to load correctly but as soon as a publish a release(with the direct references intact), the mvc binding on any of these views seem to break.

    <pre> @Html.Raw(JsonConvert.SerializeObject(ViewData.ModelState, Formatting.Indented))</pre>
    <pre> @Html.Raw(JsonConvert.SerializeObject(Model, Formatting.Indented))</pre>

    seem to work and actually print the correct data from controllers but any form binfing helpers seem to be ignored completely such as the below:

    <div class="form-group">
            <label asp-for="Server" class="control-label"></label>
            <input asp-for="Server" class="form-control"/>
            <span asp-validation-for="Server" class="text-danger"></span>
    </div>

    Any idea why? I'm also wondering what the process is to create plugins and distribute them. Would doing a dotnet publish be everything? I have plugins that use external nuget packages and full of Viewcomponents, partials, and controllers with views.

    Repo is https://github.com/kukks/btctransmuter-vnext

    Andrew Camilleri
    @Kukks
    Made an issue to keep it organized: ExtCore/ExtCore#158
    Givi Bibileishvili
    @GVX111
    hello @DmitrySikorsky
    How can i unload extension?
    Armarr
    @Armarr
    @GVX111 This is currently not possible, see ExtCore/ExtCore#44
    What we do currently to simulate this behavior is to register all interfaces from a ExtCore plugin with Autofac. During the registration we assign the Assembly name as metadata. Then on the interface consumer we apply a customized version of the MetadataFilterAttribute.
    Armarr
    @Armarr
    That filter can then determine if a certain implementation should or should not be resolved. In our case it's based on tenant settings from the database.
    Givi Bibileishvili
    @GVX111
    @Armarr and runtime load extension?
    Armarr
    @Armarr
    Benjamin Nolmans
    @Xarkam
    Givi Bibileishvili
    @GVX111
    Hi
    In extension i can't load System.Private.ServiceModel
    Loader doesnt loading all references.
    FileNotFoundException: Could not load file or assembly 'System.Private.ServiceModel, Version=4.5.0.3, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
    I have added Connected Service and app can't load references correctly. How can i fix this issue?
    Alaa Masalmeh
    @alaa-m
    image.png
    public ActionResult Index()
    {
    var repo = this.storage.GetRepository<IItemRepository>();
    return this.View(new IndexViewModelFactory().Create(repo.All()));
    }
    Hi guys,
    Anyone has an idea why repository is always return null?
    do I need to register this dependency in some area?
    public ActionResult Index()
    {
    var repo = this.storage.GetRepository<IItemRepository>(); // This line
    return this.View(new IndexViewModelFactory().Create(repo.All()));
    }
    Alaa Masalmeh
    @alaa-m
    @DmitrySikorsky
    Andy Weston
    @westonsoftware
    Hi, if I want to dynamically load 3 extensions into my web host, what is the best way to send in my appsettings?
    Would you try to use a setting file for each extension? or would you put all of your settings into the web host?
      public virtual void Execute(IServiceCollection services, IServiceProvider serviceProvider)
            {
            }
    
            public virtual void Execute(IApplicationBuilder app, IServiceProvider serviceProvider)
            {
            }
    mou7866
    @mou7866
    Hi, I would like to use ExtCore on a project in conjunction with a custom nuget package instead of a DLL. Can I please have a simple example that I can follow? I have created the extension and a .NET core MVC project. All I need to know is how to use the Nuget package I created in the startup file to add the extension.
    Flying--Dutchman
    @Flying--Dutchman
    @mou7866 There are a lot of examples here: https://github.com/ExtCore/ExtCore
    Simply scroll down to "Samples"
    This message was deleted
    Benjamin Nolmans
    @Xarkam
    @westonsoftware actually, it's not possible to load/unload dynamically net assembly in .NET Core 2.x. The .NET Core 3.0 will make this possible.
    Benjamin Nolmans
    @Xarkam
    @alaa-m I not sure if I understand your problem. But, in our app, we using a parent controller for all controllers, injecting a IStorage: https://github.com/SOFTINUX/Base/blob/master/src/SoftinuxBase.Infrastructure/ControllerBase.cs
    Dmitry Sikorsky
    @DmitrySikorsky
    Hi! I've released version 4.1.0. Added SaveAsync to the IStorage interface.
    Nastya Scherbakova
    @Nastya-Scherbakova
    @DmitrySikorsky Hi. How can I get another services in repo? When I try to get them in the constructor I get the error "Constructor on type 'APP.Repositories.XXXRepository' not found."
    Nastya Scherbakova
    @Nastya-Scherbakova
    @DmitrySikorsky solved by manually using ExtensionManager.GetInstance with needed args. It will be better if you'll resolve needed params automatically.
    Dmitry Sikorsky
    @DmitrySikorsky
    Hi Nastya! Sorry for the late answer, didn't look here for a while. Please review this issue, maybe you could add something there. Thanks. ExtCore/ExtCore#164
    Alok Sharma
    @aloksharma1
    guys i have a react question
    in our mvc app we are integrating react but i want to keep admin side non react
    so i am using reactjs.net for this, have anyone tried this
    does react routing works side by side or do we need to reqrite everything?