Base solution for your next web application

Activities of "trendline"

When using project.EntityFramework do the database migration, it not succeed. Rum from cmd line, using 'dotnet ef database update', got below message: "Could not find content root folder!"

What happened? No exception was thrown.

Yes, via "cd" command changed to root direction of the *.EntityFramework,then run "dotnet ef database update", I will share you a screenshot tomorrow

Is there an approach define navigation menu in module A, then initialize the navigation provider in main App? I also tired but navigation menu didn't show, how to archive it?

Error message when running EF cmd to update database [attachment=0:1v8222or]message for ef database update.jpg[/attachment:1v8222or]

<cite>ismcagdas: </cite> Hi,

Can you share your module's navigationProvider class ?

I defined the Module A navigation provider in the module, if I configured it in the pre-initial method in Module A, it can't work.

But if I configured it in the top level module, such as the web module, then it works.

public const string MenuName = "App";
        
        public override void SetNavigation(INavigationProviderContext context)
        {
            //var menu = context.Manager.Menus[MenuName] = new MenuDefinition(MenuName, new FixedLocalizableString("PM Menu"));
            var menu = context.Manager.Menus[MenuName];

Furthermore, must define the menu name same as the top level module defined, such as "App", then it could append after it, is there other approach to append the navigation module from a module and don't need to define with the same menu name?

<cite>hikalkan: </cite> Hi,

Have you marked your XML file as embedded resource?

For modularity; It's your design decision. But beside ABP and AspNet Zero, modularity is hard itself. For example, you have 2 modules A and B isolated from each other and independent from the main app. What if you need to use some class of A from B? Will you create an abstraction into a common module? So, it may be hard. But if you are OK with these, it has obvious advantages like re-usability and maintainability.

Have a nice day.

I also encountered this issue, and there is no way to make the XML file as embedded resource in .net core project.

Yes, just like you said, a strange problem. I changed the name of the solution to the old one, it works fine.

<cite>ismcagdas: </cite> Hi,

The current template renders only menu with name "App", you can check [*SideBarViewComponent.cs] and Default.cshtml under "Views/Shared/[*SideBar]/".

In your other modules you can create different menus but in that case you need to change SideBarViewComponent to render all menus instead of menu with name App.

In order to embed xml files in your module, you can check the project.json in *.Core project.

Thanks, localization issues fixed follow up your suggestion. Regarding to the navigation menu, I append the module navigation menu to the menu with name "App", is there a way that I could insert the new module menu in a specified position in the "App" name?

<cite>ismcagdas: </cite> Hi,

Actually changing solution name after project creatin is not suggested but I understand there might be such a need after some time of development.

We didn't share our project renaming code because of licensing issues, see <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/issues/200">https://github.com/aspnetzero/aspnet-zero/issues/200</a>.

In your case I think you need to change project names in WebContentDirectoryFinder.cs. But if you even solve this problem, there might be some other issues.

Where I can find WebContentDirectoryFinder.cs file?

As we know, if we create a new solution then come with below projects(asp.net core version) MyCompany.ApbZeroTemplate.Application MyCompany.ApbZeroTemplate.Core MyCompany.ApbZeroTemplate.EntityFramework MyCompany.ApbZeroTemplate.Migrator MyCompany.ApbZeroTemplate.Web

If I add a new module A with modular structure like below MyCompany.ApbZeroTemplate.Application MyCompany.ApbZeroTemplate.Core MyCompany.ModuleA.Application MyCompany.ModuleA.Core MyCompany.ApbZeroTemplate.EntityFramework MyCompany.ApbZeroTemplate.Migrator MyCompany.ApbZeroTemplate.Web

Is there an approach I can add a separated ModuleA.EntityFramework project to manage DbSets for ModuleA? If so, how to do database migration? If not, is there an approach that I can manage the DbSets of ModuleA in a separated place? Not all under MyCompany.ApbZeroTemplate.EntityFramework?

Showing 1 to 10 of 154 entries