Relative Content

Tag Archive for c#sql.netentity-frameworklinq

Use some kind of helper function In EF Select query to make subquery

I have several tables that handles different kinds of translations for my entities and those tables to linked via relations to other entities.
I use subquery to directly access translations tables which is fine. This subquery is pretty similar in each case and takes several lines of code that I ideally want to move to some kind of helper.

Join Table based on startWith function

I have two tables to join. and the Joining condition is a column that should be like or starts with the other column not exactly equal. How to do that in Linq. down is my function:

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.