Raso
Raso
CC#
Created by Raso on 5/9/2024 in #help
How do I do an inner GroupJoin on dotnet?
I'm using .NET 6 with Entity Framework. This is my situation: I have a BenefitEntity (with Name and Description properties and a relationship with BenefitCategory) and this BenefitCategory which has Name and Description as well. In the application, all the Names and Descriptions are translated, we have a TranslationEntities table that contains all the translations. Here are the three classes (I'll keep it simple and put just the properties we need):
C#
public class BenefitEntity
{
public Guid Id { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public Guid BenefitCategoryId { get; set; }
public virtual BenefitCategoryEntity CategoryEntity { get; set; }
}

public class BenefitCategoryEntity
{
public Guid Id { get; set; }
public string Name { get; set; }
public string Description { get; set; }
}

public class TranslationEntity
{
public Guid EntityId { get; set; }
public string Language { get; set; }
public string Property { get; set; }
public string Value { get; set; }
}
C#
public class BenefitEntity
{
public Guid Id { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public Guid BenefitCategoryId { get; set; }
public virtual BenefitCategoryEntity CategoryEntity { get; set; }
}

public class BenefitCategoryEntity
{
public Guid Id { get; set; }
public string Name { get; set; }
public string Description { get; set; }
}

public class TranslationEntity
{
public Guid EntityId { get; set; }
public string Language { get; set; }
public string Property { get; set; }
public string Value { get; set; }
}
The TranslationEntities table contains all the translations, for all the entities type. I want to get all the BenefitEntity, using the GroupJoin for their Name/Description and do another inner join for its BenefitCategory name and description. I'm able to do the first one, but not able to do the second one.
2 replies
CC#
Created by Raso on 8/29/2023 in #help
❔ Add extension on controller
Hello! I have backend in dotnet, frontend with Angular. before FE can call my BE, there's a gateway which redirect. I got told that on the endpoints that need a certain path (dotnet backend side) I need to add the openapi extension x-dynamic-param: true.. How do I do that? How do I add that extension on my controller's method?
2 replies