Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "fawad29"

Answer

Hi

Can you provide some example code for this as it will help me to go in the right direction?

Question

I am aware that the framework uses in-memory database to run tests. My issue is that we keep some configuration data for each tenant in tenant's database. Now in order to create test, we need to manually create that configuration data in the code for each tenant and then create tests and run them. This is very manual process. Is there a way, where we continue to use in-memory database in tests but can retrieve the configuration data from the actual database?

Product Details Product version is 8.0.0. ABP Framework is the one which came with version 8.0.0. ASP.NET Core MVC & jQuery Project

Thanks

Answer

So, are you saying that I use item 2 from the list given below? If I use 1 from the list below, will it have any issues?

  1. I create a method in the domain service that simply calls this existing application service method (this way cache is already implemented in the application service), all application services call this new domain service function.
  2. Implement the method in the domain service and implement cache in the domain service (I don't know if it can be done in ABP architecture).
  3. Implment the method in the domain service with cache (this is NOT ideal)
Answer

Permission Checker is just an example, it could be something completely different as well, so what would be the best way for that. Please provide some example with code.

  1. I create a method in the domain service that simply calls this existing application service method (this way cache is already implemented in the application service), all application services call this new domain service function.
  2. Implement the method in the domain service and implement cache in the domain service (I don't know if it can be done in ABP architecture).
  3. Implment the method in the domain service with cache (this is NOT ideal).

I had check that link before posting, can you please answer my specific quetions?

I have written code which passess dto to domain from application services and vice versa so aspnetzero does not prevent it explicitly but I would like to know if it will break anything or is it against the best practices?

Question

I have a permission checking code in application service and I would like to move it to the domain service as it is being used by more than one application services. In the current method, I get the permissions from the database and has implemented a cache so that the next time application does not get the permissions from the database. My question is that you recommend implementing cache in application service so if I move this method to the domain service then I will lose the functionality of cache. I can see following three options, can you help?

  1. I create a method in the domain service that simply calls this existing application service method (this way cache is already implemented in the application service), all application services call this new domain service function.
  2. Implement the method in the domain service and implement cache in the domain service (I don't know if it can be done in ABP architecture).
  3. Implment the method in the domain service with cache (this is NOT ideal).

I have the same question, I know the document says that domain service should return entity which can be converted into dto, similarly entity/entities should be passed to domain services. In order to reduce redundancy, I want to pass dto as parameter to domain service and return a dto back from domain service. I know I can do this in the code (as it is not being prohibited in the code), however does it break anything?

I have written code which passess dto to domain from application services and vice versa so aspnetzero does not prevent it explicitly but I would like to know if it will break anything or is it against the best practices?

Answer

I am unable to access following link, I am logged in with my credentials to aspnetzero support. https://github.com/aspnetzero/aspnet-zero-core/issues/3013

Answer

Are you referring to following code in AppMenuViewComponent

var model = new MenuViewModel
            {
                Menu = await _userNavigationManager.GetMenuAsync(AppNavigationProvider.MenuName, _abpSession.ToUserIdentifier()),
                CurrentPageName = currentPageName
            };

How will the menu order be handled? Can I recreate Abp's menu in my database and then just get all menu from the database instead of getting Abp's from navigationManager and then appending mine from the database?

This is not an option for us because we have a lot of pages and it will not be user friendly for our users as they will find a client and they select a page to visit via Actions page, they will then need to come back to the main page and search for client again and then user action page to visit another page.

Is it not possible to capture or register for click event on menu?

Showing 41 to 50 of 79 entries