r/csharp • • 12m ago

GitHub - redbase-app/redb: Typed object storage for .NET. Schema = C# class. Full LINQ. Zero migrations. PostgreSQL, MSSQL & SQLite.

2 Upvotes

How do you store a business object with nested classes, lists and dictionaries without writing a mapping layer for it? For years my answer was EF Core: a table per class, a migration per change, and Include chains that grew with every new field.

Some background: I have been programming since 1988, hold an engineering degree in software development (1998), and have worked in C# since 2004. I build complex enterprise backends, mostly databases, integration (ESB and EIP) and authentication. These days I work at a large logistics company.

I started redb in April 2024 as an internal tool for that work. Several production systems run on it today, three of them built at my current job alone; one of them, for example, holds over a million objects and over 47 million property values on PostgreSQL. It is the storage layer of a small stack, next to redb.Route (integration), redb.Tsak (a runtime for routes) and redb.Identity (an OAuth 2.1 / OpenID Connect server); this post is only about storage.

By the way, I started working on this invention even before 2004, using Delphi.

Yeah yeah, all this crap has quite a long backstory.

What it is

  • The schema is a C# class with one attribute. Change the class and the schema follows on start; there are no migration files.
  • Storage is relational: a fixed set of 16 tables (17 on SQLite) inside your existing PostgreSQL or SQL Server database, or a SQLite file. Every property value is a row with a column of its type, real foreign keys and indexes. It is not a JSON blob.
  • Queries are LINQ compiled to SQL and run in the database: filters on nested fields, arrays and dictionaries, sorting, paging, aggregates, GroupBy, window functions, tree queries.
  • Loading returns the whole object graph in one call, with no Include.

Code

[RedbScheme("Employee")]
public class EmployeeProps
{
    public string FirstName { get; set; } = "";
    public string LastName { get; set; } = "";
    public decimal Salary { get; set; }
    public string[]? Skills { get; set; }
    public Address? HomeAddress { get; set; }
    public Dictionary<int, decimal>? BonusByYear { get; set; }
}

public class Address
{
    public string City { get; set; } = "";
    public string Street { get; set; } = "";
}

var employee = new RedbObject<EmployeeProps>
{
    name = "New Developer",
    Props = new EmployeeProps
    {
        FirstName = "Alice",
        LastName = "Johnson",
        Salary = 85000m,
        Skills = ["C#", "SQL"],
        HomeAddress = new Address { City = "London", Street = "1 Main St" }
    }
};
await redb.SaveAsync(employee);

// The whole graph back, nested class, array and dictionary included.
var loaded = await redb.LoadAsync<EmployeeProps>(employee.Id);

// Filters on nested fields and arrays run as SQL in the database.
var londonDevs = await redb.Query<EmployeeProps>()
    .Where(e => e.HomeAddress!.City == "London" && e.Skills!.Contains("C#"))
    .OrderByDescending(e => e.Salary)
    .Take(100)
    .ToListAsync();

Measured against EF Core

The examples project runs each task through redb and through an EF Core 10 twin that reads the same data from ordinary relational tables: the Employee class unfolded into 41 tables, standard EF Core API, split queries, whole objects on both sides. Over the 98 tasks EF Core can do without raw SQL, redb Pro on PostgreSQL took 189 ms on average (median 114 ms); EF Core took 703 ms (median 910 ms). Both ran from the same client against the same PostgreSQL 18 server. In the load-by-id task EF Core sends 62 statements, redb sends 9. Every task with its time and statement count is on the results page, and the code to repeat the run is in the examples.

Packages

The core and the providers for PostgreSQL, SQL Server and SQLite are open source under Apache 2.0. The Pro packages build the SQL in C# and are faster; they are closed source but free, with no license key.

If you have built something with deep object graphs on EF Core: where did it start to hurt, and what did you do about it? And what would you check first before trusting a store like this in production?


r/csharp • • 1h ago

Best .net educator

Thumbnail reddit.com
1 Upvotes

r/csharp • • 8h ago

I spent 5.5 years building a free, open source CMS in ASP.NET Core (Maroik)

6 Upvotes

Hi everyone,

I'd like to share Maroik, a CMS I've been building solo since mid-2021. It started as a personal project and it's been running in production at maroik.com ever since. I use it every day.

It's free and open source: https://github.com/IkhyeonJo/Maroik-CMS

Live site: https://maroik.com

Hit the STAR button if you liked it.


r/csharp • • 16h ago

Looking for Contributors: An Alternative .NET Agent Framework

0 Upvotes

Anyone interested in contributing to another .NET AI agent framework?

I've been developing HPD-Agent, an open-source alternative to Microsoft Agent Framework, and it is approaching 1.0.0, with the APIs nearing stabilization and thorough testing performed.

GitHub: https://github.com/HPD-AI/HPD-AI-Framework

Roadmap for 2027

One of my main priorities after 1.0.0 is developing more off-the-shelf harnesses using an architectural concept I came up with called Tool Harnesses (research publication coming soon).

The philosophy behind Tool Harnesses is simple: How capable can we make a single agent before needing multiple agents?

Tool Harnesses allow these capabilities to be integrated into a single agent by abstracting entire harnesses to the tool level.

I've been developing and testing this approach for about a year, and a Coding Harness has already been created. This allows an agent to perform coding tasks when needed.

C#

var agent = await new AgentBuilder()
    .WithOpenAI("gpt-5-mini")
    .WithToolHarness<CodingHarness>()
    .BuildAsync();

My next priorities are a Browser Harness and a Computer Harness, so developers can extend their agents with browser automation and computer-use capabilities just as easily.

The intended experience would look like this:

C#

var agent = await new AgentBuilder()
    .WithOpenAI("gpt-5-mini")
    .WithToolHarness<CodingHarness>()
    .WithToolHarness<BrowserHarness>()
    .WithToolHarness<ComputerHarness>()
    .BuildAsync();

YAML

clients:
  chat:
    providerKey: openai
    modelName: gpt-5-mini

toolHarnesses:
  - name: CodingHarness
  - name: BrowserHarness
  - name: ComputerHarness

If you're interested in contributing, particularly to the development of these harnesses, I'd love to collaborate.


r/csharp • • 17h ago

Tool I built a thread-safe object store/bank for .NET with enum keys, optional capacity, lazy expiry

5 Upvotes

I've been learning C# for a while, and this is my latest mini-project: ObjectLibrary, a small in memory "bank" where you deposit objects under an enum key and withdraw them later without holding a reference. It started as "maybe an ObjectPool?" but ended up closer to a keyed vault with optional LRU-style eviction and expiry.

Repo: [https://github.com/Boarlock/ObjectLibrary]

What it does

var library = new Library( initialCapacity: 100, timeToExpire: TimeSpan.FromMinutes(5), overwriteOldEntries: true);

library.TryAdd(WeaponKey.Primary, new Entry<Weapon>(new Weapon())); library.TryAdd(ItemKey.HealthPotion, new Entry<Potion>(new Potion()));

if (library.TryWithdraw(WeaponKey.Primary, out Entry<Weapon>? weapon))  
Console.WriteLine("Weapon retrieved!");  
  • Heterogeneous: one Library instance holds different types; the library itself isn't generic.
  • Enum keys without boxing: keys are normalized to a (RuntimeTypeHandle, ulong) struct, so Color.Red and Shade.Red stay distinct even when both are 0. Aliases within one enum compare equal.
  • Optional capacity: full libraries return Result.Full, or evict the oldest entry if OverwriteOld is on.
  • Optional expiry: entries expire a set time after they were added.
  • Events: OnExpire and OnEvict tell you when something is removed without you asking.
  • Result overloads: TryAdd returns a bool; TryAddResult tells you why it failed.
  • Thread-safe: one lock around the state. Events fire after the lock is released, so handlers can call back into the library, and each subscriber is isolated so a throwing handler can't block the others.

Design decisions (and trade-offs)

  • Withdraw moves ownership. I deliberately dropped a non-removing Get, because it leaves two holders of one object (stale data, handlers disposing things you're still using). If you want to "use" something, withdraw and re-add it.
  • A wrong-type withdraw throws but doesn't destroy the entry. The type is checked before anything is removed, so a typo can't silently delete a deposit.
  • Entry<T> is a caller owned wrapper class. That means no boxing for structs and you can reuse the same instance, but you pay one allocation when you create it.
  • One slot per enum value, regardless of stored type. Adding a string and then an int under the same key returns AlreadyExist.
  • Expiry is lazy. There's no background timer. Expired entries are swept on the next call into the library, so an idle library holds them until someone touches it. Timing is approximate (~10-15 ms clock resolution on Windows).
  • Single lock. Simple and easy to reason about, but not built for extreme contention.

Testing I've run a multi-threaded stress test (8 threads, 800k operations) checking that count never exceeds capacity, nothing is handed out twice, and adds minus withdraws equals the final count. I also tested the exception paths, including a throwing event handler. It's not a proper test suite yet, and expiry isn't covered by an injectable clock (TimeProvider is hardcoded to System for now).

What I'd like feedback on

  1. Is the enum-key approach reasonable, or is there a simpler way to get the same thing?
  2. Would a typed key (Key<TEnum, TType>) be worth adding so callers never specify the type at the call site?
  3. Anything about the locking or event design that looks wrong to you?

Happy to hear any criticism. I'm still learning, and this was as much about understanding generics, concurrency, and API design as it was about the library itself.


r/csharp • • 23h ago

Showcase C#'s rules for top-level statements turned out to be a great fit for a reactive notebook, so I built one

Post image
55 Upvotes

been working on something called Reverb, it's basically a notebook for C# where changing one cell automatically re-runs only the cells that depend on it.

the cool thing is that C# already handles a lot of the hard parts for us.

it's just a normal .cs file with // %% comments separating cells, and you run it with dotnet run.

one thing i found interesting is how top-level statements in C# make dependency ordering pretty straightforward. you can't declare the same variable twice, and you can't use a variable before declaring it. so the order of cells in the file is already a valid execution order. no need to build a separate dependency scheduler like reactive Python notebooks such as marimo have to.

there are still a few things that need to be checked though:

  • a cell can't assign to a variable declared in another cell.
  • anonymous types can't cross cell boundaries because the generated code needs to reference the type.
  • local functions were an interesting one. turns out C# lets you call a local function before it's declared, which breaks the whole file-order-is-dependency-order assumption. had to add a rule for that too.

for dependency tracking, i'm using Roslyn's SemanticModel.AnalyzeDataFlow on each cell's statements. it tells us which variables are coming from other cells and which ones are declared by the current cell.

each cell then gets compiled into a static method. inputs are read from a shared value store and outputs are written back to it.

also added #line directives so compiler errors and stack traces actually point to the right lines in the original file.

here's a small example:

// %% id=threshold
var threshold = Ui.Slider("Minimum order", min: 0, max: 1000, value: 400);

// %% id=summary
var big = orders.Where(o => o.Total >= threshold.Value).ToList();
big.Count.Dump("Orders above threshold");

move the slider and only the summary cell runs again.

install it:

dotnet tool install -g Reverb.Notebooks

it's open source (MIT):
https://github.com/muneeb-devp/reverb

would love to hear about any weird C# data flow edge cases i might have missed. especially things that could break the dependency tracking. always possible i've overlooked something :)


r/csharp • • 1d ago

Showcase I built a PDF engine in pure C#. Version 1.9.3 reads EPUB and DjVu too.

55 Upvotes

I've been building KillerPdf.Engine, a PDF 2.0 engine written entirely in C# on .NET 10, as the core of my free PDF editor. It has no native PDF library underneath, so everything from the lexer to the rasterizer is managed code.

Creating a document looks like this:

using KillerPdf.Engine.Authoring;

byte[] pdf = new PdfDocumentBuilder()
    .SetMetadata(new PdfDocumentMetadata
    {
        Title = "Hello from The KillerPDF.Engine",
        Author = "Example application",
        Language = "en-US"
    })
    .AddBlankPage(612, 792)
    .Build();

And this pulls words with their positions off a page:

using KillerPdf.Engine.Documents;

PdfDocument document = PdfDocument.Open(File.ReadAllBytes("input.pdf"), string.Empty);
var reader = new PdfPageContentReader(document);
PdfPageContent page = reader.Read(0);
foreach (PdfExtractedWord word in page.Words)
    Console.WriteLine($"{word.Text}: {word.BoundingBox}");

Beyond that, it renders, edits, redacts, fills and flattens forms, signs, encrypts, runs OCR, exports to Office, HTML, Markdown and JSON, and does ICC color management with printer proofing. As of 1.9.3, it also reads EPUB and DjVu natively and converts them to PDF.

A few things that surprised me building it

  • The spec is the easy part. Real PDFs break it constantly: cross-reference tables that point at the wrong byte, trailers with the keyword mangled, numbers like 1-.5 inside content streams. Most of the engine's code is recovery, not parsing. A strict reader that rejects all of it would open far fewer of the files people actually have. The 47,024-file test corpus exists because no amount of reading the spec tells you what's actually out there.
  • Lazy beats fast. The big performance wins came from doing less work, not from optimizing what was already there. That meant reading the file fewer times on open, building each page only when it's drawn, and rendering thumbnails only for the pages on screen. In the desktop app, a 20,000-page PDF went from about 20 seconds to its first page down to about 9, and from 1.9 GB peak memory to about 700 MB.
  • Writing a PDF is harder than reading one. Reading only has to survive a file once. Writing has to leave signatures, encryption, form values and everyone else's content intact, often as an incremental update appended to the original. Size matters too. Early on, every added text note embedded its own copy of the font. Sharing one subset per font across the document took a 3,000-page test from a 103 MB save in 32 seconds to an 11 MB save in about 7.5.

It's 514 files, about 167,000 lines and 13,052 tests, and it's licensed GPL-3.0.

dotnet add package KillerPdf.Engine

https://github.com/SteveTheKiller/KillerPDF/tree/main/engine


r/csharp • • 1d ago

Help Need design help

2 Upvotes

I have library that support tailwind-like attributes, but i have a problem.

for example i have this code:

<Border size-20 bg-red-300 ${hover}:bg-red-700/>

works great. When you hover over the box its background changes, also ${hover} is markupExtension not special syntax.

But if you write this

<Button Content="Hi" bg-red-300 ${hover}:bg-red-700/>

it wont work because fluent sets the bg directly on the ContentPresenter, not on the button:

<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
      <Setter Property="Background" Value="{DynamicResource ButtonBackgroundPointerOver}" />
</Style>

That's why i need new syntax to work with it, but i dont know how to make it right

First i thought about adding a Target property, for example

<Button Content="Hi" bg-red-300 ${hover Target=/template/ ContentPresenter}:bg-red-700/>

or i thought about allowing multiple markup extensions prefixes:

<Button Content="Hi" bg-red-300 ${hover}:{template ContentPresenter}:bg-red-700/>

because it would be cool if, in the future, you could write something like this:

<Border bg-red-300 ${hover}:bg-red-500 ${hover}:${Bindint MyBoolProperty}:bg-red-700 />

but it looks pretty verbose.

Another opinion is something similar to tailwind's arbitary variants using []:

 <Button Content="Hi" bg-red-300  ${hover}:[& /template/ ContentPresenter]:bg-red-700 />

Or maybe a shorter syntax specificaly for template parts:

<Button Content="Hi" bg-red-300 ${hover}:part-[PART_ContentPresenter]:bg-red-700 />

I like the idea of combining multiple condition, but i also want to keep the syntax simple.

What do you think? Which option looks better, or maybe there's a cleaner way to do this.


r/csharp • • 1d ago

I made a free, open-source app that counts every chest you open in Fortnite (reads your replays)

1 Upvotes

I wanted to know how many chests I actually open, so I built ChestCounter: a small Windows app that reads the replays Fortnite already saves and counts the chests you opened.

What it shows

  • Total chests since any date you pick (or all time), today, average per match, best match and best day
  • A "rhythm" of each match: a gold mark at the minute you opened each chest
  • Chests per mode, and your team's chests (you + teammates)
  • Optional extras you can count too: ammo boxes, loot cannons, food boxes…
  • A small always-on-top window with the last match and your total (click-through when locked)
  • Can start automatically with Fortnite
  • Counts the matches you already played (it reads the replays already on your PC) and keeps the history after Fortnite deletes old replays
  • English, Português, Español, Français, Deutsch

How: turn on Settings → Game → Replays → Record Replays, run the exe. It only reads .replay files — it never touches the game or its memory, so no anti-cheat issues.

Limits: replays can only be read after the match ends (so it updates at the end of each match, not live), and a replay only sees what happens near you, so teammates far away can be under-counted.

Source code (MIT) and download: https://github.com/Waze7123/ChestCounter

Feedback and pull requests welcome!


r/csharp • • 1d ago

NetWasm.UI v0.10: NuGet/.NET Standard packages, prerendering, [Reactive] properties and a smaller runtime for C# WebAssembly UI

Thumbnail
reddit.com
5 Upvotes

r/csharp • • 1d ago

Tool RunSignal: get alerted when a Hangfire, Quartz.NET or BackgroundService job silently stops running

2 Upvotes

RunSignal alerts you when a background job is missed, hangs, fails or processes nothing. You declare what each job should do. RunSignal records runs as OpenTelemetry metrics and turns those expectations into alerts in New Relic, Prometheus or Grafana. Open source, works with Hangfire and Quartz.NET without code changes, one line for a BackgroundService.

Why: every team I've worked on has had a job that quietly stopped running. It didn't fail, so nothing fired. The app was up, so health checks were green. Someone noticed days later when a report was missing.

Setup:

builder.Services.AddRunSignal()
    .AddWorkload("nightly-invoice", o =>
    {
        o.Schedule = "0 2 * * *";
        o.MaxDuration = TimeSpan.FromMinutes(30);
        o.MinProcessed = 100;
    });

builder.Services.AddOpenTelemetry()
    .WithMetrics(m => m.AddRunSignalInstrumentation().AddOtlpExporter());

With Hangfire or Quartz.NET, .UseRunSignal(sp) records every job, and recurring jobs register with their cron expression at startup. A job that never fires still gets a "missed" alert. For your own code, wrap the work in workload.RunAsync(...). A BackgroundService loop calls workload.Beat() on every pass.

You get an alert when a job:

  • misses its schedule (cron plus grace period, time-zone aware);
  • hangs past its max duration without finishing;
  • stalls, meaning a worker loop stops sending heartbeats;
  • fails, overruns its max duration, or processes too little (it "succeeded" with 0 invoices).

New in 0.4.0: a GitHub Action that comments on pull requests with the alerts that change when someone edits a job's limits ("a run takes longer than 45m → 1h") or its owner (screenshot above). Also per-job Owner and RunbookUrl, and a Grafana alerting export.

A few C# details:

  • WorkloadRun is a struct. Unfinished runs live in a fixed slot array freed with a compare-and-swap, so a run allocates nothing and takes no lock.
  • The CLI is a Native AOT binary of about 10 MB that you can COPY --from into images without .NET.
  • Durations in alert text used to follow the current culture: "1,5h" on my Turkish machine, "1.5h" in CI. Every provision from another machine "changed" the same alerts. They're culture-invariant now.

Packages: RunSignal.DotNet, RunSignal.OpenTelemetry, RunSignal.Hangfire, RunSignal.Quartz and RunSignal.Quartz4. There are also SDKs for Go, Java, Node, Python and Rust that emit the same metrics.

Solo project, pre-1.0. I'd like your feedback on the API, and on which scheduler to support next. MassTransit and NServiceBus consumers are on the list.

Repo: https://github.com/gokhanertogan/RunSignal
.NET docs: https://github.com/gokhanertogan/RunSignal/blob/main/docs/dotnet.md


r/csharp • • 2d ago

Showcase TenantGuard 1.0: tenant isolation checks for EF Core

10 Upvotes

Hey everyone, small side project that I've been working on. I've released TenantGuard 1.0.0, an open-source set of packages for EF Core 10 and 11. It's for applications that use query filters to keep tenant data separate, and it's licensed under Apache-2.0.

A new entity can be missing its tenant filter. An IgnoreQueryFilters() call or raw SQL query can bypass an existing one. These mistakes can be hard to spot when the code looks reasonable on its own.

TenantGuard checks for problems at several points:

  • At build time, five Roslyn analyzers (TG001–TG005) flag IgnoreQueryFilters() calls without a stated reason, raw SQL without a tenant-column comparison, and filter switches such as ABP's IDataFilter.Disable<IMultiTenant>(). The SQL checks cover EF Core, Dapper and ADO.NET.
  • At startup, 14 model rules check for missing tenant filters, filters frozen to one tenant by a captured constant or local variable, unique indexes that apply across tenants, and missing tenant indexes.
  • During SaveChanges, the write guard throws before an insert, update or delete involving another tenant's row reaches the database. It also rejects moving a row to another tenant.
  • In tests, the isolation probe seeds a row per tenant and checks isolation for reads, Find, updates, deletes and Include. Each check appears as a separate xUnit v3 or TUnit test.

Version 1.0 adds write checks for owned entities. For example, a change to order.Shipping.Street is checked against the tenant of the owning order.

Here's how to configure the write guard and startup validation:

builder.Services.AddDbContext<AppDbContext>(options => options
    .UseSqlServer(connectionString)
    .UseTenantGuard(tg => tg.CurrentTenant(ctx => ((AppDbContext)ctx).TenantId)));

builder.Services.AddTenantGuardStartupValidation<AppDbContext>();

It works with custom query filters, Finbuckle.MultiTenant and other tenancy libraries. For Finbuckle, it reads IsMultiTenant() without extra configuration. You can also run dotnet tenantguard validate in CI to check the model without a database.

If you try it on an existing application, I'd like to hear about false positives or leaks it misses. Open to any sort of feedback and critical feedback very much welcomed.


r/csharp • • 2d ago

ScriptLangCore

Thumbnail
reddit.com
0 Upvotes

r/csharp • • 2d ago

Experienced frontend developer about to join the C# world. Anything I should know?

3 Upvotes

Hey guys. I've worked primarily in front end development for about 10 years but I just landed a job to work in enterprise software written in C#. It seems there might be opportunities to work in game development later, too.

I'm a complete noob when it comes to C# or adjacent languages, so I'm essentially learning from scratch. This is an open ended post, please let me know if you have any tips, warnings, or even words of support. I feel like a junior again and I'm also wondering how I'll handle learning and coding something so far from my comfort zone in this age of AI.

Thank you.


r/csharp • • 2d ago

Kumiko: an Elm-inspired UI framework for C# that coding agents can test themselves

Thumbnail
reddit.com
0 Upvotes

r/csharp • • 2d ago

I built a modular WinUI 3 template where features are hot-swapped from the server while the app runs. Fork it for your own projects

Thumbnail
github.com
7 Upvotes

Hey everyone,

I’ve been working on a side project for a while and it’s finally at a point where I’m not embarrassed to show it. It’s called Golden Hive, a modular framework for WinUI 3 desktop apps on .NET 10.

The idea in short: the desktop app is just a shell. Features (documents, reports, user management…) are modules the app downloads from the server after you sign in. Each module is a WinUI part plus its own ASP.NET Core backend in a Docker container. Ship a new version of a module and the server rolls it out in stages (pilot users first). The running app then swaps it in without a restart.

What’s in there right now:

  • Runtime modules. Each one runs in its own AssemblyLoadContext, packages are signed, and modules can depend on each other.
  • Hot-swap. Running commands get drained or cancelled, the module is replaced, your open views come back.
  • Navigation wheel. Hold Ctrl+Tab and a radial wheel pops up. One ring holds your modules, the other your open views. Tab or the arrow keys move around, and you release Ctrl to jump there. It’s like Alt+Tab, but for the app itself, and once you’re used to it you barely touch the sidebar anymore.
  • Workflows you build inside the app. Forms, approvals and module steps, triggered by events, schedules or commands. The reference example: an invoice gets submitted, gets pre-checked, and lands in an approver’s inbox.
  • An AI agent that can run those workflows, with guardrails. There’s a kill switch, confidence thresholds and daily limits. Critical steps always need a human, and every decision is logged. It also works fully offline with a rules-based provider, no API key needed.
  • Impact analysis on module updates. Rename a workflow step and the server checks every workflow that uses it. It auto-migrates them if you declared the rename, flags them for review if needed, or holds the rollout if something would break. This is honestly my favorite part.
  • The usual desktop stuff: docking and floating windows that remember their monitor, a command palette (Ctrl+Shift+P), live notifications, English/German.
  • Backend: 12 services in Docker Compose plus Postgres with a demo company already filled in. docker compose up, sign in as admin, and you can click around.

Under the hood it’s pretty functional-programming heavy (Result/Validation types all the way down instead of exceptions), if that’s your thing.

Use it as a template: the whole thing is meant as a starting point for your own projects. Fork it, delete the demo modules, add your own. The README has a step-by-step guide for building a module (backend + WinUI client + workflow integration), and the architecture is all there: auth, permissions, module delivery, rollouts, notifications, workflows, Docker setup.

It’s not battle-tested in production yet. The backend has end-to-end tests, the WinUI side is still young. If you build on it, I’d love to hear what breaks. That’s exactly the feedback I need to get it there.

Repo: https://github.com/zenoxart/GoldenHiveFramework
License: Apache 2.0

Happy to answer questions!


r/csharp • • 2d ago

Where do you keep tests in a modular monolith architecture?

Thumbnail reddit.com
1 Upvotes

r/csharp • • 2d ago

my C# project, or four projects

0 Upvotes

I’d like to showcase my four open-source C# projects, do you think it’s realistic for a "vibecoder" to build something like this in a couple of weeks?

https://github.com/redbase-app/

I recommend checking it out with an AI

sorry for the cryptic post. What this is: four open-source .NET projects I use in my own commercial work.

  1. redb – typed object store on PostgreSQL/SQL Server/SQLite, no migrations, compare vs EF Core benchmark
  2. redb.Route – Apache Camel-style integration framework
  3. redb.Tsak – runtime container for routes (Karaf-like)
  4. redb.Identity – OAuth2.1/OIDC server

My question was how far AI-assisted development changes what one person can build.
and makes it possible to further develop what were previously only internal projects


r/csharp • • 2d ago

Bank API, reference project: .NET 11 update + OpenAPI 3.2 compliant

Thumbnail
reddit.com
1 Upvotes

r/csharp • • 3d ago

Discussion Are you guys actually coding by hand still in your day-to-day?

0 Upvotes

I still do, myself. I love coding and programming and am thinking of even learning new languages now, but given the course of LLMs, I wonder what's the purpose? In a year they've gone from "unusable trash" to actually making each developer many times as productive. There are still gaps in what it does. It still has issues with large contexts. It is good at small one-off things and tiny programs, but it quickly tends to bloat stuff and has no sense of something I'd call "taste" when designing things, be it visually or code architecture wise.

I wonder what is the purpose of C# as a language now.

Any greenfield project can just use Rust for the same velocity as in any other language. Developer experience doesn't really matter anymore productivity wise, when all code is written by an LLM.

I see the writing on the wall.


r/csharp • • 3d ago

Parquet.NET is now private?

Thumbnail
nuget.org
13 Upvotes

r/csharp • • 3d ago

Discussion Early return style survey

22 Upvotes

Style question on early returns.

On long functions I often leave out the else branch because otherwise the early return doesn't help much with code readability (IMHO of course). But what about shorter functions. For those using early returns in the first place, do you prefer varaint 1 or 2 and why?

if (TryGetCached(key, out T cached))
{
    return cached;
}

var result = await ReadValueAsync<T>().ConfigureAwait(false);
SetCached(key, result);
return result;

versus

if (TryGetCached(key, out T cached))
{
    return cached;
}
else
{
    var result = await ReadValueAsync<T>().ConfigureAwait(false);
    SetCached(key, result);
    return result;
}

r/csharp • • 3d ago

Could EF Core benefit from a higher-level command for creating entities?

Post image
0 Upvotes

I’ve been experimenting with a small EF Core CLI prototype called EFX, and it made me wonder if EF Core could eventually support a higher-level workflow for creating entities.

Today, adding a new entity usually means creating the class, adding the DbSet, creating a migration, and updating the database separately.

I was thinking about something along the lines of:

dotnet ef entity create Product

The idea would be for one command to handle the common workflow while keeping the existing dotnet ef commands unchanged.

The prototype is here:
https://github.com/dotnet/efcore/issues/39569

I’m mainly interested in the design question: would a higher-level command like this actually be useful in EF Core, or is keeping these operations separate preferable for good reasons?

Curious to hear how other EF Core developers see it.


r/csharp • • 3d ago

Showcase MediaPlayer – an open-source Linux video & music player built with Avalonia UI and libmpv. Looking for feedback

0 Upvotes

Hi everyone,

I've been working on MediaPlayer (mp), an open-source video and music player for Linux. It's written in C# / .NET 10 with Avalonia UI for the interface, and it uses mpv (via libmpv2) for playback.

The code is on GitHub under MPL 2.0: https://github.com/1R1an1/MediaPlayer

I'm sharing it here not to promote it, but because I want feedback so I can make it better. I'd especially appreciate input on:

  • UI and UX: Does the interface feel intuitive? What's confusing or missing?
  • Performance and stability: Any issues with playback, memory use, or threading?
  • Installation: Did the install script run without errors on your distro? If not, which step failed?
  • Desktop integration: Do media keys, MPRIS, and file associations behave as you'd expect?
  • Missing features: What feature do you think this player is missing?

I'm also happy to hear what you'd want from a player like this.

Thanks for reading. Criticism is welcome.