Skip to content

c1ph3rj/linq-exercise

Repository files navigation

LINQ in C# - precise, practical & linq

LINQ Dev Practice

LINQ Dev Practice

.NET C# License

A focused C# LINQ practice repository built around a realistic marketplace dataset, a 150-question catalog, and a deterministic judge.

In short: write LINQ, run scenarios, discover truths. Occasionally also discover off-by-one bugs.

Why this repo exists

Most LINQ examples online are tiny and clean. Real data is neither.

This project gives you practical, messy, relational-style JSON data so you can practice:

  • filtering and projections
  • joins and relationship traversal
  • grouping, aggregates, and ranking
  • time-based reporting and trends
  • set operations and funnel analysis
  • anomaly and data-quality checks

What you get

  • Assets/ — JSON datasets for a multi-seller commerce domain
  • UserSolutions.cs — your practice surface
  • LINQSolutions/JudgeAnswers.cs — canonical answer behavior
  • Docs/DATASET_OVERVIEW.md — dataset explanation + Mermaid ER diagram
  • Docs/QUESTIONS.md — full 150-question bank
  • Docs/QUESTIONS_WITH_ANSWERS.md — guided walkthroughs
  • Docs/LINQ_QUERY_GUIDE.md — operators and patterns reference

Quick start

dotnet build
dotnet run

Running dotnet run opens an interactive launcher where you can practice, inspect datasets, or run a full audit.

Command reference

dotnet run -- --list
dotnet run -- --datasets
dotnet run -- Q5
dotnet run -- Q5 --include-real
dotnet run -- Q5,Q6
dotnet run -- --all-user
dotnet run -- --all-user --include-real
dotnet run -- --judge Q141,Q150
dotnet run -- --audit
  • dotnet run → opens interactive launcher
  • --list → prints full catalog with explicit input/output contracts
  • --datasets → prints dataset details and relationships
  • Q5 → runs your UserSolutions answer for selected question(s)
  • --include-real → includes full asset-backed scenario
  • --all-user → runs every UserSolutions method
  • --judge / --reference → runs canonical judge answers
  • --audit → runs judge answers across all registered scenarios

Scenario model

Each question can run against up to three scenario types:

  • Dummy happy path
  • Dummy edge/boundary
  • Real dataset

By default, selected-question practice runs the fast dummy scenarios. Add --include-real when you want production-style pain (the educational kind).

Dataset domain snapshot

The dataset models a multi-seller Indian e-commerce platform including:

  • customers, loyalty, addresses, login behavior
  • sellers, suppliers, products, categories
  • orders, order items, payments, shipments, refunds
  • reviews, support tickets, event tracking
  • warehouses and inventory snapshots

See Docs/DATASET_OVERVIEW.md for ER relationships and details.

Repository layout

  • Assets/ data files
  • Docs/ guides and question bank
  • LINQSolutions/ catalog, judge answers, and contexts
  • Models/ contracts and runner models
  • Services/ dataset loading, judging, helpers

Contributing

See CONTRIBUTING.md.

If you spot a mismatch in wording, expected outputs, or dataset assumptions, open an issue or PR. Thoughtful fixes are always welcome.

License

Licensed under the MIT License.

Note

This project includes AI-assisted content and structuring. Human review is still the final judge (as it should be).

About

LINQ Dev Practice — a compact C# learning repo with realistic marketplace JSON datasets, a 150-question problem bank, and a deterministic judge. Use it to write and validate LINQ queries against fast dummy scenarios or full real-data scenarios for practical, hands-on skill building.

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages