Base solution for your next web application

Activities of "ismcagdas"

Hi,

Can you share your repository interface and implementation ?

Hi,

Sorry for my late response, I have reproduced this problem and made a fix for you.

First define a extension for UserMenuItem class like this,

public static class UserMenuItemExtensions
{
    public static bool IsMenuActive(this UserMenuItem menuItem, string currentPageName)
    {
        if (menuItem.Name == currentPageName)
        {
            return true;
        }

        if (menuItem.Items != null)
        {
            foreach (var subMenuItem in menuItem.Items)
            {
                if (subMenuItem.IsMenuActive(currentPageName))
                {
                    return true;
                }
            }
        }

        return false;
    }
}

Then in _Sidebar.cshtml file, for each menu list item <li>, we need to use this extension method to check if that menu item is active or not.

For example, first level menu item must be like this,

<li class="@(i==0 ? "start" : "") @(menuItem.IsMenuActive(Model.CurrentPageName) ? "active" : "")">

child menu item:

<li class="@(childMenuItem.IsMenuActive(Model.CurrentPageName) ? "active" : "")">

and secondLevelChildMenuItem:

<li class="@(secondLevelChildMenuItem.IsMenuActive(Model.CurrentPageName) ? "active" : "")">

it will be included in the next version of aspnetzero, I have reopened the issue <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/issues/108">https://github.com/aspnetzero/aspnet-zero/issues/108</a>.

Thanks for informing us about this problem.

Hi,

Define your repository interfaces in *.Core project and implement them in *.EntityFramework project. You can find a custom repository example in simple task system sample here <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate-samples/tree/master/SimpleTaskSystem">https://github.com/aspnetboilerplate/as ... TaskSystem</a>.

ITaskRepository <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate-samples/blob/master/SimpleTaskSystem/SimpleTaskSystem.Core/Tasks/ITaskRepository.cs">https://github.com/aspnetboilerplate/as ... ository.cs</a>

TaskRepository <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate-samples/blob/master/SimpleTaskSystem/SimpleTaskSystem.EntityFramework/EntityFramework/Repositories/TaskRepository.cs">https://github.com/aspnetboilerplate/as ... ository.cs</a>

Answer

Hi,

@maxmjbn, Thank you for sharing your experience :).

Hi,

You can use MySql, there is no problem with it and AspNet Zero does not contain any Stored Procedure. We choosed Sql Server as default because we try to use Microsoft technologies as much as possible.

Hi,

Is there any error message in Logs.txt file under Logs folder of your web project ? If there is not, you can check window's event viewer to check any error messages ?

If you can any error message, we can try to help.

Hi,

For your first question, you can create your version of CrudAppService and add attribute to it. For example:

[AbpAuthorize]
public class MyCrudAppService<TEntity, TEntityDto>
   : CrudAppService<TEntity, TEntityDto, int>
   where TEntity : class, IEntity<int>
   where TEntityDto : IEntityDto<int>
{
    protected MyCrudAppService(IRepository<TEntity, int> repository)
        : base(repository)
    {
        
    }
}

For your second question, CrudAppService already implements AbpServiceBase. CrudAppServie inherits CrudAppServiceBase inherits ApplicationService inherits AbpServiceBase.

Hi,

You can use entities with long primary keys just define your interface and class like this,

public interface IListingCache : IEntityCache<ListingDto, long>
{

}
public class ListingCache : EntityCache<Listing, ListingDto,long>, IListingCache, ITransientDependency
{
    public ListingCache(ICacheManager cacheManager, IRepository<Listing, long> repository)
        : base(cacheManager, repository)
    {

    }
}

There is noting different actuallay, it's a special version of caching. From documentation

While ASP.NET Boilerplate's cache system is general purpose, there is an EntityCache base class that can help you if you want to cache entities.

Hi,

Records on the AbpNotifications table are deleted after they inserted to the AbpTenantNotifications and AbpUserNotifications, that is normal.

In order to get notifications, logged in user must be subscribed the notification you are publishing, can you check that ?

Showing 12031 to 12040 of 12740 entries