Base solution for your next web application

Activities of "doubledp"

Pardon the use of the incorrect terminology. Thank you very much for the help.

Answer

It would appear that the only change required was as I predicted. For anybody interested I will include the code changes that I have made:

<div class="page-sidebar md-shadow-z-2-i  navbar-collapse collapse">
    
    
    
    
    
    
    <ul class="page-sidebar-menu" data-keep-expanded="false" data-auto-scroll="true" data-slide-speed="200" ng-class="{'page-sidebar-menu-closed': settings.layout.pageSidebarClosed}" ng-if="vm.menu.items.length">
        
        <li ng-repeat="menuItem in vm.menu.items" ui-sref-active="active" ng-class="{'start':$first}">
            <a ui-sref="{{menuItem.url}}" ng-if="!menuItem.items.length">
                <i class="{{menuItem.icon}}"></i>
                <span class="title">{{menuItem.displayName}}</span>
            </a>
            <a href="javascript:;" class="auto" ng-if="menuItem.items.length">
                <i class="{{menuItem.icon}}"></i>
                <span class="title">{{menuItem.displayName}}</span>
                <span class="arrow "></span>
            </a>
            <ul class="sub-menu" ng-if="menuItem.items.length">
                
                <li ng-repeat="childMenuItem in menuItem.items" ui-sref-active="active" ng-class="{'start':$first}">

                    <a ui-sref="{{childMenuItem.url}}" ng-if="!childMenuItem.items.length">
                        <i class="{{childMenuItem.icon}}"></i>
                        <span class="title">{{childMenuItem.displayName}}</span>
                    </a>
                    <a href="javascript:;" class="auto" ng-if="childMenuItem.items.length">
                        <i class="{{childMenuItem.icon}}"></i>
                        <span class="title">{{childMenuItem.displayName}}</span>
                        <span class="arrow "></span>
                    </a>
                    <ul class="sub-menu" ng-if="childMenuItem.items.length">
                        
                        <li ng-repeat="childOfChildMenuItem in childMenuItem.items" ui-sref-active="active" ng-class="{'start':$first}">
                            <a ui-sref="{{childOfChildMenuItem.url}}" ng-if="!childOfChildMenuItem.items.length">
                                <i class="{{childOfChildMenuItem.icon}}"></i>
                                <span class="title">{{childOfChildMenuItem.displayName}}</span>
                            </a>
                            <a href="javascript:;" class="auto" ng-if="childOfChildMenuItem.items.length">
                                <i class="{{childOfChildMenuItem.icon}}"></i>
                                <span class="title">{{childOfChildMenuItem.displayName}}</span>
                                <span class="arrow "></span>
                            </a>
                            <ul class="sub-menu" ng-if="childOfChildOfChildMenuItem.items.length">
                                
                                <li ui-sref-active="active" ng-repeat="childOfChildOfChildMenuItem in childOfChildMenuItem.items">
                                    <a ui-sref="{{childOfChildOfChildMenuItem.url}}">
                                        <span>
                                            <i class="sub-menu-icon {{childOfChildOfChildMenuItem.icon}}"></i>{{childOfChildOfChildMenuItem.displayName}}
                                        </span>
                                    </a>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </li>
            </ul>
        </li>
    </ul>
</div>
Answer

No problem, glad to be making a contribution :D

Answer

There is a bug on the level 4 menu.. I have corrected it now. Here is the updated code:

<div class="page-sidebar md-shadow-z-2-i  navbar-collapse collapse">
    
    
    
    
    
    
    <ul class="page-sidebar-menu" data-keep-expanded="false" data-auto-scroll="true" data-slide-speed="200" ng-class="{'page-sidebar-menu-closed': settings.layout.pageSidebarClosed}" ng-if="vm.menu.items.length">
        
        <li ng-repeat="menuItem in vm.menu.items" ui-sref-active="active" ng-class="{'start':$first}">
            <a ui-sref="{{menuItem.url}}" ng-if="!menuItem.items.length">
                <i class="{{menuItem.icon}}"></i>
                <span class="title">{{menuItem.displayName}}</span>
            </a>
            <a href="javascript:;" class="auto" ng-if="menuItem.items.length">
                <i class="{{menuItem.icon}}"></i>
                <span class="title">{{menuItem.displayName}}</span>
                <span class="arrow "></span>
            </a>
            <ul class="sub-menu" ng-if="menuItem.items.length">
                
                <li ng-repeat="childMenuItem in menuItem.items" ui-sref-active="active" ng-class="{'start':$first}">

                    <a ui-sref="{{childMenuItem.url}}" ng-if="!childMenuItem.items.length">
                        <i class="{{childMenuItem.icon}}"></i>
                        <span class="title">{{childMenuItem.displayName}}</span>
                    </a>
                    <a href="javascript:;" class="auto" ng-if="childMenuItem.items.length">
                        <i class="{{childMenuItem.icon}}"></i>
                        <span class="title">{{childMenuItem.displayName}}</span>
                        <span class="arrow "></span>
                    </a>
                    <ul class="sub-menu" ng-if="childMenuItem.items.length">
                        
                        <li ng-repeat="childOfChildMenuItem in childMenuItem.items" ui-sref-active="active" ng-class="{'start':$first}">
                            <a ui-sref="{{childOfChildMenuItem.url}}" ng-if="!childOfChildMenuItem.items.length">
                                <i class="{{childOfChildMenuItem.icon}}"></i>
                                <span class="title">{{childOfChildMenuItem.displayName}}</span>
                            </a>
                            <a href="javascript:;" class="auto" ng-if="childOfChildMenuItem.items.length">
                                <i class="{{childOfChildMenuItem.icon}}"></i>
                                <span class="title">{{childOfChildMenuItem.displayName}}</span>
                                <span class="arrow "></span>
                            </a>
                            <ul class="sub-menu" ng-if="childOfChildMenuItem.items.length">
                                
                                <li ui-sref-active="active" ng-repeat="childOfChildOfChildMenuItem in childOfChildMenuItem.items">
                                    <a ui-sref="{{childOfChildOfChildMenuItem.url}}">
                                        <span>
                                            <i class="sub-menu-icon {{childOfChildOfChildMenuItem.icon}}"></i>{{childOfChildOfChildMenuItem.displayName}}
                                        </span>
                                    </a>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </li>
            </ul>
        </li>
    </ul>
</div>

Apologies for only replying now. The repositories is defined within the Entity Framework layer and the DTO's within the Application layer right?

Currently I have a 2nd dbContext class as per below:

using System.Data.Common;
using System.Data.Entity;
using Abp.EntityFramework;
using WebApplication.Storage;

namespace WebApplication.EntityFramework
{
    public class SecondDbContext : AbpDbContext
    {
        public virtual IDbSet<BinaryObject> BinaryObjects { get; set; }

        public SecondDbContext() 
            : base("Second")
        {

        }

        public SecondDbContext(string nameOrConnectionString)
            : base(nameOrConnectionString)
        {

        }

        public SecondDbContext(DbConnection dbConnection)
            : base(dbConnection, true)
        {

        }
    }
}

Then I have added another it's equivalent base repository class as per below:

using Abp.Domain.Entities;
using Abp.EntityFramework;
using Abp.EntityFramework.Repositories;

namespace WebApplication.EntityFramework.Repositories
{
    public abstract class SecondRepositoryBase<TEntity, TPrimaryKey> : EfRepositoryBase<SecondDbContext, TEntity, TPrimaryKey>
        where TEntity : class, IEntity<TPrimaryKey>
    {
        protected SecondRepositoryBase(IDbContextProvider<SecondDbContext> dbContextProvider)
            : base(dbContextProvider)
        {

        }
    }

    public abstract class SecondRepositoryBase<TEntity> : SecondRepositoryBase<TEntity, int>
        where TEntity : class, IEntity<int>
    {
        protected SecondRepositoryBase(IDbContextProvider<SecondDbContext> dbContextProvider)
            : base(dbContextProvider)
        {

        }
    }
}

Do I create a custom repositories for the stored procedures as per your suggestion for each module that I have?

What I don't understand is in a AppService the IRepository<Entity> is in the constructor that injects the repository accordingly. I assume that this resolved correctly because of the IDbSet<Entity> within the 1st DbContext class.

How does this then work if I won't have a entity in the newly created 2nd DbContext class?

Excuse my ignorance, this is fairly new to me and I would really like to understand how everything fits together.

Thank you Halil :D

I using the Angular version. I wonder if it possible to control the updating of the javascript libraries through npm?

What is your thoughts regarding this?

Ah ok, I understand. I am currently using VS2015 and I will try to implement something like in my own project.

Thank you for the insight

When you create a new entity and add it to the second dbcontext, you can inject IRepository<NewEntity> as normally. ABP understand which dbcontext defines the entity and create correct repository class.

Does that then mean that I only create the entity in the domain layer and omit the IDbSet<Entity> in the dbContext?

My understanding is that setting IDbSet<Entity> or DbSet<Entity> is what actually tells EF to create the table on the database when doing a migration.

I obviously don't want to create tables as I call the SP that aggregates the data and returns it in a result set. Subsequent to that I will also have a SP for the detail of the aggregation as a drilldown.

Sorry for all the questions; my SQL is stronger than my C# and I am also still getting to grips with O-O programming, as I have come from a procedural language background. :cry:

You can download the whole Metronic theme from the release version of ASP.NET Zero in GitHub. Not sure which version you are running but the latest Metronic is found in v1.6.0. The documentation and examples can be found within the theme. Please see link below:

<a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/releases">https://github.com/aspnetzero/aspnet-zero/releases</a>

Thank you very much :D

Like I said before, I don't want you to provide me with a solution. I don't think it is fair and also I won't be learning anything. :geek:

I can definitely work with the direction you have provided me and I am forever in your debt with regards to that.

I have looked at the code within the ABP solution, but I must be honest, I get a bit lost at times :oops:

All I know is that this is most well written architecture I have ever seen and would very much like to stick this brilliance.

Showing 1 to 10 of 35 entries