Starts in:
2 DAYS
6 HRS
49 MIN
39 SEC
Starts in:
2 D
6 H
49 M
39 S

Activities of "jarrad78"

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

  • ABP Framework version: v4.2.1
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:

I have created simple test scenario with the following entity and child entity

Parent Entity     public class SampleTestX : FullAuditedAggregateRoot<Guid>, IMultiTenant     {         public Guid? TenantId { get; set; }         public string TestA { get; set; }         public string TestB { get; set; }         public string TestC { get; set; }         public string TestD { get; set; }

        public ICollection<SampleTestX2> samples { get; set; }

        public SampleTestX()         {

        }

        public SampleTestX(Guid id)         {             Id = id;         }

        public SampleTestX(Guid id, Guid? tenantId, string testA, string testB, string testC, string testD)         {             Id = id;             TenantId = tenantId;             TestA = testA;             TestB = testB;             TestC = testC;             TestD = testD;         }     }

Child Entity     public class SampleTestX2 : FullAuditedEntity<Guid>, IMultiTenant     {         public Guid? TenantId { get; set; }         public string SampleA { get; set; }         public string SampleB { get; set; }

        public Guid SampleTestXId { get; set; } //FK         public SampleTestX sample { get; set; } //Nav Link

        public SampleTestX2()         {

        }

        public SampleTestX2(Guid id, Guid? tenantId)         {             Id = id;             TenantId = tenantId;         }     }

app service interface:     public interface ISampleTestXAppService : ICrudAppService<SampleTestXDto, Guid, PagedAndSortedResultRequestDto, CreateSampleTestXDto, UpdateSampleTestXDto>     {         Task<SampleTestXExtendedDto> GetExtendedAsync(Guid id);     }

app service:     public class SampleTestXAppService : CrudAppService<SampleTestX, SampleTestXDto, Guid, PagedAndSortedResultRequestDto, CreateSampleTestXDto, UpdateSampleTestXDto>, ISampleTestXAppService     {         private IRepository<SampleTestX, Guid> _testRepository;         public SampleTestXAppService(IRepository<SampleTestX, Guid> testRepository) : base(testRepository)         {             _testRepository = testRepository;         }

        public virtual async Task<SampleTestXExtendedDto> GetExtendedAsync(Guid id)         {             var sampleTestX = await GetSampleTestX<SampleTestXExtendedDto>(id, true);             return sampleTestX;         }

        private async Task<TSampleTestXDtoType> GetSampleTestX<TSampleTestXDtoType>(Guid id, bool isExtended = false) where TSampleTestXDtoType : SampleTestXDto         {             var tmp = await _testRepository.GetAsync(id: id, includeDetails: isExtended);             return ObjectMapper.Map<SampleTestX, TSampleTestXDtoType>(tmp);         }     } Repo Interface:     public interface ISampleTestXRepository : IRepository<SampleTestX, Guid>     {

    }

EFCore Repo Implementation:     public class EfCoreSampleTestXRepository : EfCoreRepository<AppDbContext, SampleTestX, Guid>, ISampleTestXRepository     {         public EfCoreSampleTestXRepository(IDbContextProvider<AppDbContext> dbContextProvider) : base(dbContextProvider)         {         }

        public override async Task<IQueryable<SampleTestX>> WithDetailsAsync()         {             // Uses the extension method defined above             return (await GetQueryableAsync()).IncludeDetails();         }     }     public static class SampleTestXExtensionMethods     {         public static IQueryable<SampleTestX> IncludeDetails(this IQueryable<SampleTestX> queryable, bool include = true)         {             if (!include)             {                 return queryable;             }

            return queryable                 .Include(x=>x.samples);         }     }

I want to use CrudAppService to be able to create parent and child entity at same time. Is this possible using CrudAppService in MultiTenant scenario? I am able to successfully create the parent and child entity but the tenantId of child entity is always blank upon creation. If I were to create custom app implementation then injecting ICurrentUser would be no problem but using CrudAppService I do not see where this is possible for child entity. Am I missing something or is this not possible?

  • ABP Framework version: v4.1.1
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Seperated (Angular): No
  • Exception message and stack trace: N/A
  • Steps to reproduce the issue: N/A

Is there documentation to help me understand what each Identity Server client is used for exactly? It is obvious what Blazor and Swagger clients are there for in DBMigrator appsettings.json file but I am unsure about _Web and _App. Are these two endpoints necessary in my usage scenario?

For example if I create a Blazor Project with the following configuration: abp new ExampleProject -t app-pro -u blazor

If I deploy this project to Azure App Service I will have two independent App Services to deploy, (ExampleProject.HttpApi.Host and ExampleProject.Blazor) each app service will have an independent url.

For example: ExampleProject.HttpApi.Host - https://exampleProject-Blazor.azurewebsites.net ExampleProject.Blazor - https://exampleProject-HttpApiHost.azurewebsites.net

1.) How would this be usage scenario be configured in the IdentityServer clients section below for creating the DBMigration in DBMigrator project? 2.) Are _Web and _App clients even necessary in this usage case? 3.) Do you have more detailed documentation on IdentityServer configuration specific to ABP-PRO Blazor

  "IdentityServer": {
    "Clients": {
      "**ExampleProject_Web**": {
        "ClientId": "ExampleProject_Web",
        "RootUrl": "https://localhost:44323/"
      },
      "**ExampleProject_App**": {
        "ClientId": "ExampleProject_App",
        "RootUrl": "http://localhost:4200"
      },
      "**ExampleProject_Blazor**": {
        "ClientId": "ExampleProject_Blazor",
        "RootUrl": "http://localhost:44307"
      },
      "**ExampleProject_Swagger**": {
        "ClientId": "ExampleProject_Swagger",
        "ClientSecret": "1q2w3e*",
        "RootUrl": "https://localhost:44319"
      }
    }
  }

Is the expected config for HttpApi + Blazor config as follows?

DBMigrator - appsettings.json

"IdentityServer": {
    "Clients": {
        "ExampleProject_Blazor": {
            "ClientId": "ExampleProject_Blazor",
            "RootUrl": "https://exampleProject-Blazor.azurewebsites.net"
        },
        "ExampleProject_Swagger": {
            "ClientId": "ExampleProject_Swagger",
            "ClientSecret": "1q2w3e*",
            "RootUrl": "https://exampleProject-HttpApiHost.azurewebsites.net"
        }
    }
}

ExampleProject.Blazor - appsettings.json

{
  "AuthServer": {
    "Authority": "https://exampleProject-HttpApiHost.azurewebsites.net",
    "ClientId": "ExampleProject_Blazor",
    "ResponseType": "code"
  },
  "RemoteServices": {
    "Default": {
      "BaseUrl": "https://exampleProject-HttpApiHost.azurewebsites.net"
    }
  },
  "AbpCli": {
    "Bundle": {
      "Mode": "BundleAndMinify", /* Options: None, Bundle, BundleAndMinify */
      "Name": "global",
      "Parameters": {
        "LeptonTheme.Style": "Style6", /* Options: Style1, Style2... Style6 */
        "LeptonTheme.ChangeStyleDynamically": "true"
      }
    }
  }

ExampleProject.HttpApi.Host - appsettings.json

{
"App": {
  "SelfUrl": "https://exampleProject-HttpApiHost.azurewebsites.net",
  "CorsOrigins": "https://*.ShopLogic.com,https://exampleProject-Blazor.azurewebsites.net"
},
"ConnectionStrings": {
  "Default": ".........."
},
"AuthServer": {
  "Authority": "https://exampleProject-HttpApiHost.azurewebsites.net",
  "RequireHttpsMetadata": "false"
}
"StringEncryption": {
  "DefaultPassPhrase": ".........."
},
"Settings": {
  "Volo.Abp.LeptonTheme.Style": "Style3", /* Options: Style1, Style2... Style6 */
  "Volo.Abp.LeptonTheme.Layout.MenuPlacement": "Top", /* Options: Left, Top */
  "Volo.Abp.LeptonTheme.Layout.MenuStatus": "AlwaysOpened", /* Options: AlwaysOpened, OpenOnHover */
  "Volo.Abp.LeptonTheme.Layout.Boxed": "False", /* Options: True, False */
  "Abp.Mailing.Smtp.Host": "127.0.0.1",
  "Abp.Mailing.Smtp.Port": "25",
  "Abp.Mailing.Smtp.UserName": "",
  "Abp.Mailing.Smtp.Password": "",
  "Abp.Mailing.Smtp.Domain": "",
  "Abp.Mailing.Smtp.EnableSsl": "false",
  "Abp.Mailing.Smtp.UseDefaultCredentials": "true",
  "Abp.Mailing.DefaultFromAddress": "noreply@abp.io",
  "Abp.Mailing.DefaultFromDisplayName": "ABP application"
},
"AbpLicenseCode": ".........."
}

Thanks for your feedback.

Showing 11 to 12 of 12 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06