Menu

📰
0

Reddit - Please wait for verification

Reading 0:00
15s threshold

Hey guys! I’ve been working on a library called QChain focused on reusable and composable DAL queries on top of LINQ and EF Core. Main goal: avoid duplicated joins, filters, projections, and repository method explosion in larger applications. Instead of composing everything directly on IQueryable with anonymous intermediate shapes, queries become reusable pipelines returning IQuery . Example: public IQuery ActiveEuropeanOrdersInLastMonth() => db.Accounts .Join(db.Orders, a => a.AccountId, o => o.AccountId, (a, o) => ValueTuple.Create(a, o)) .Where(x => x.account.IsActive().And(x.order.InLastMonth())); Then later: OrderDto[] orders = await unitOfWork.Query(db => db.AccountsRepository.ActiveEuropeanOrdersInLastMonth() .Select(x => new OrderDto(x.order.OrderId, x.account.Email)) .Skip(index * size) .Take(size)) .ToArrayAsync(); A big focus was preserving composability across joins/grouping while still translating correctly through EF Core.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More