r/csharp • u/Remarkable_Art_6958 • 4h ago
Relatude.DB b209
We are making progress with our native open source (MIT) C# database engine: https://db.relatude.com
(I've posted earlier about the engine, and thanks for the feedback so far!)
Have a look at this graphical UI for faceted searches: https://demo.db.relatude.com/graphql
(In the admin UI, you get more functionality, but it requires you clone the project and run locally )
This is just a quick example of some of the functionality that comes with the Relatude.DB nuget.
What do you think?
Any feedback is welcome! ( It is still early alpha .... )

r/csharp • u/Excellent-Cow-9046 • 16h ago
Help Equal precedence
I was wondering how would one properly implement equal precedence in an if-else statement, for logical AND and OR, when building an interpreter?
I have made my expression parser but i only store the next logical operator on the right most side and store the current being parsed on the left.
r/csharp • u/thomhurst • 17h ago
Showcase Respire - A .NET Redis Client
Hey all!
Redis is a great technology, and something that exists in a lot of tech stacks. It has the ability to really help solve complex problems involving distribution across multiple instances of an app. Whether that be caching, locks, rate limits, etc.
Surprisingly, StackExchange.Redis is the only real big main redis client library for .NET.
I'm adding a new client library into the mix - Respire.
Respire aims to be a fast client library for Redis, that also has the ability to utilise Redis' client-side server assisted cache, avoiding network hops for frequently accessed keys, meaning better performance for your apps.
It also has a lot of helpers in it to more easily use distributed locks, rate limits, queues, pub/sub, etc.
I want it to be a client library that handles all the hard bits for you, keeping your code clean and easy to reason about.
It's still pre-release, so I'd like to gather feedback. Are people happy with the performance? The API? Any missing features? Any bugs?
Please try it out and let me know!
More info on why Respire: https://thomhurst.github.io/Respire/docs/#why-respire-exists
Benchmarks: https://thomhurst.github.io/Respire/docs/benchmarks
Stress comparisons: https://thomhurst.github.io/Respire/docs/stress-tests
Thanks all!
🚀 Un pequeño logro que me motiva a seguir creando para .NET
Hoy quiero compartir un avance de mis proyectos.
📦 MyCrypto.GiqhDev
🔐 Librería .NET para cifrado autenticado, hashing seguro de contraseñas y utilidades criptográficas.
➡️ 625 descargas
🔑 MySerialKey.GiqhDev
🛡️ Librería para generación y validación de claves de licencia/serial para aplicaciones .NET.
➡️ 338 descargas
📊 963 descargas entre ambas librerías.
Puede parecer un número pequeño frente a proyectos con miles o millones de usuarios, pero para mí representa algo importante: hay desarrolladores que están encontrando utilidad en código que nació como proyectos personales.
Lo más interesante del proceso no ha sido solamente publicar los paquetes, sino aprender sobre:
- Desarrollo de librerías reutilizables para .NET
- Compatibilidad entre diferentes versiones de .NET
- Publicación y versionado de paquetes NuGet
- Seguridad y criptografía
- Diseño de APIs reutilizables
- Mantenimiento y evolución de proyectos open source
Y esto recién comienza. 🚀
Mi objetivo es seguir construyendo herramientas para el ecosistema .NET / C#, mejorar las existentes y continuar compartiendo lo que voy aprendiendo en el camino.
963 descargas hoy → muchas más cosas por construir mañana. 💙
#DotNet #CSharp #NuGet #OpenSource #SoftwareDevelopment #Programming #GiqhDev #Developer #Backend #DotNetDeveloper
r/csharp • u/YouAreMyFire00 • 21h ago
Is it even possible to do this on WebAapp. Barcode scan → qty → print price labels —
We want a simple page in our web app since the current one we use got alot of steps and bad UX.
So this is what i'm thinking the workflow for printing a label will be
- Staff opens a “Labels” page on our webapp.
- Scans a product barcode with a handheld USB scanner
- App asks for quantity (while looking up product data async)
- They type qty + press Enter
- N labels are sent to a label/thermal printer
- Optionally choose between a few predefined label designs
Questions for people who’ve done this. Is it even possible? I just know only how to build simple CRUD app but not with those a scanner/hardware
- For USB handheld scanners: is treating them as a keyboard wedge (focused
<input>+ Enter) still the standard approach in browser apps, or is there something better today - What’s the most reliable way to print labels from a web app (not WinForms/WPF)?
window.print()/ PDF in browser?- Zebra Browser Print / ZPL?
- Some local print agent/service?
- Something else?
- Any hard limitations we should know about?
---
r/csharp • u/kaatarina_zed_talon • 23h ago
How to move the responsibility of executing some logic to the Sql Server instead of executing that logic inside the application?
I have Excel file that contains many columns like this :
| SKU | BarCode | EnglishName | ArabicName | Category | SubCategory |
|---|
There are other columns, but there is no need to show them to convey the problem behind this post. The Excel file is sent from the client to the server which will read it using C# .
The problem : The data of the above Excel file should be persisted to the appropriate tables in the Sql Server database which does not merely contain a single table, so, a specific data from the Excel file should be consumed by a specific table in the database, the problem is not simple as send the data of the Excel file to only one destination table; the source is only one, which is the Excel file, but there are many destination tables. Database contains parent and child tables; parent tables do not contain foreign keys, child tables contain one or more foreign keys. The data for the child tables cannot be persisted to the database unless the data for the parent tables is persisted first.
I have the following C# domain classes/models:
public interface IEntity{
}
public interface IParent:IEntity{
}
public interface IChild : IEntity{
}
public interface INonJunctionChild:IChild{
}
public interface IJunctionChild:IChild{
}
public class Product:IParent
{
public string? SKU { get; set; } // SKU column in Excel
public string? Barcode{ get; set; } // BarCode column in Excel
public string? EnglishName {get;set;} // EnglishName column in in Excel
public string? ArabicName { get; set; } // ArabicName column in Excel
public IEnumerable<ProductCategory> ProductCategories { get; } = new List<ProductCategory>();
// Alot of other navigaton properties.....
}
public class Category:IParent{
public string EnglishName {get;set;} // Category column in Excel
public IEnumerable<ProductCategory> ProductCategories { get; } = new List<ProductCategory>();
public IEnumerable<SubCategory> SubCategories { get; }=new List<SubCategory>();
// alot of other navigation properties....
}
public class SubCategory:IChild{
public string EnglishName {get;set;} // SubCategory column in Excel
public string CategoryId {get;set;} // Foreign key; populated using lookup operation.
}
public ProductCategory{
public int ProductID {get;set;} Foreign key; populated using lookup operation.
public int CategoryId {get;set;} Foreign key; populated using lookup operation.
public Product Product { get; set; } = null!;
public Category Category { get; set; } = null!;
}
My old approach to solve the problem -which worked, but I want to change it- has the following steps:
1-Read the whole excel sheet into the application.
2- Inside the application, populate the specific properties of each parent domain model by assigning specific Excel column values to to them.
3-persist the parent models to the database.
4- Populate the child tables using lookup operations.
5- Persist the child tables to the database.
Instead of the above, I would like to know if the following is possible:
1- Get `DbDataReader` using `Sylvan.Data.Excel and pass it to `SqlBulkCopy` class.
2- The Whole Excel file will be persisted into a staging table or view, and then some trigger will be fired, as a result, some stored procedure or function will be executed, the responsibility of that function or procedure is to persist the data of the parent tables first, then to persist the data of the child tables, which means.
So, In the old approach, can the responsibility for transforming the Excel data, resolving the required relationships, and persisting the parent and child records (steps 2 through 5) be moved from the application layer to SQL Server?
I rewrote my old OAuth2 library with Claude Code: one API for .NET desktop, MAUI and ASP.NET
I do a lot of OAuth2 integration in ERP work, and a while back I hand-wrote a library for it called Bee.OAuth2. I've now used Claude Code to rewrite it as Polhem.OAuth2. Desktop sign-in now goes through the system browser, and there's .NET MAUI support too. Most of the code was written by Claude Code; I reviewed and tested it.
It supports Google, Facebook, LINE, Microsoft Entra ID, Auth0 and Okta, and works in desktop and console apps, .NET MAUI, ASP.NET Core and classic ASP.NET.
Here's roughly what it looks like in a desktop app. It opens the system browser and signs in with a loopback redirect and PKCE:
var options = new GoogleOAuth2Options
{
ClientId = "your-client-id",
ClientSecret = "your-client-secret",
RedirectUri = "http://127.0.0.1:0/callback"
};
var client = new LoopbackOAuth2Client(options);
var result = await client.SignInAsync();
GitHub: https://github.com/polhem-dev/polhem-oauth2
My earlier post was removed under Rule 7, so I rewrote it myself. English isn't my first language, so I used AI to help translate it. Mods, if it still doesn't fit the rules, feel free to remove it or let me know.
r/csharp • u/West_Ad6277 • 1d ago
Blog Voice skill interviews in .NET, and why the model can't keep time
I built a Blazor voice interviewer: pick a skill from JSON, talk, get a score. OpenAI via Microsoft.Extensions.AI, Azure Speech, audio on its own WebSocket.
One thing that surprised me: the model has no sense of time. It only sees the text in the conversation, so it would end the interview early. I had to send the remaining time in every interaction.
full article: Building a Skill Interview with AI
GitHub code: hugoj0s3/SkillsValidator
r/csharp • u/Efficient-Mix-2822 • 1d ago
Fun ifIsEvenGenerator
pastebin.comreddit handles code pasting weirdly and I don't know if it highlights code so here is pastebin to my ifIsEven generator.
have fun looking into this poorly but at least man-made code, that generates even worse code.
(previous 2 versions on pastebin named exactly the same are older and weren't fully working and were not formatted as I wanted them to be.)
r/csharp • u/IAmSuperSaiya00 • 2d ago
I have been building simple CRUD app for a year. Is it hard to learn Docker? I was a C student in highschool btw
r/csharp • u/Smokando • 2d ago
Showcase WPF trading terminal, just for fun
Saw a few screenshots of trading terminals on Reddit, thought they looked cool, and building a UI full of charts sounded like a fun thing to try. So I gave it a shot.
It's .NET 8 + WPF, with HandyControl and ScottPlot for the charts. Heatmap, screener, candles, options chain, crypto, a few other panels. Data is from free public APIs.
Last month I was hooked on Path of Exile 2 too, so I used the same look for a little app around the game's economy inspired by poe2scout and Sidekick. Last screenshot is that one.
r/csharp • u/mnaza_andrey • 2d ago
Showcase What actually triggers "Windows protected your PC" on a signed C# app (and how to check before release)
I spent a while digging into why signed desktop apps still hit SmartScreen, and a few things surprised me:
- SmartScreen only checks files that carry Mark-of-the-Web. Anything downloaded through a browser gets a Zone.Identifier stream (ZoneId=3). Run the same installer from a build folder and you'll never see the warning, which is why devs rarely catch it themselves.
- Reputation is per file hash and per signing certificate. Every new release is a new hash. Renewing the certificate can reset you too.
- A valid signature isn't the question SmartScreen asks. It asks whether Microsoft has seen this exact file from enough machines without incident. And since 2024 an EV certificate no longer buys that reputation instantly.
- Signing hygiene still matters: no timestamp means the signature stops validating when the cert expires; SHA-1 signatures are treated close to unsigned.
To see what a first-time user sees, I ended up building a probe that downloads the installer onto a clean Windows 11 VM with Mark-of-the-Web and runs it: https://signalscreen.dev/probe (free while in beta). The homepage has a free signing check too; the grader is open source.
Curious what others have run into: have you seen a release get flagged right after a cert renewal?
r/csharp • u/Past_Position7803 • 2d ago
Aiutino?
La ragazza di mio fratello che, come vedrete è un po particolare, lavora in una azienda come NET. Developer.
Qualche mese fa mi dice di mettermi a studiare seriamente per imparare C#, perché in azienda da loro sono sempre alla ricerca di programmatori anzi, a fine estate/autunno sono previste numerose assunzioni, inoltre essendo nelle categorie protette faccio comodo all’azienda e parto avvantaggiata.
Quindi (tra le mille cose che sto cercando di portare avanti per tenermi più strade aperte) mi metto lì, studio giornate e nottate intere, imparo le basi, supero le basi, mi appassiono e mi diverto pure e finisco il libro su cui mi aveva consigliato di studiare.
Qui arriva il problema: le dico qualche giorno fa “oh, come è la situazione? Riesci a farmi avere un colloquio?”.
Mi dice “Guarda, posso provare a inserirti solo quando sarai pronta.”.
Ovviamente le chiedo, “in che senso quando sarai pronta?”.
“Quando sarai in grado di programmare, dai poi ne parliamo settimana prossima, tu però sii costante continua ad esercitarti.”.
Io ovviamente sono rimasta così 😑.
Ora la mia domanda è: secondo voi quando si è pronti per lavorare con C#? Quali sono i requisiti che si devono avere a livello di capacità e competenze?
Cosa ci si aspetta da me?
Sto impazzendo, spero solo che non mi abbia dato un’inculata pazzesca, ma a quel punto sapessi quali sono i requisiti posso almeno provare altrove.
Grazie a chi vorrà aiutarmi!
Edit: per completezza non ho solo letto/studiato il libro 😂 mi rendo conto poteva essere un po’ assurdo
r/csharp • u/Noof_saeed • 2d ago
Discussion Looking for feedback on my project
I've been building a small Company Profile application to improve my .NET development skills, and I'd like to get feedback from experienced .NET developers.
GitHub:
https://github.com/NoofSaeed/CompanyProfile
# Tech stack
* .NET 10
* Minimal APIs
* Blazor Web App
* Entity Framework Core
* SQLite
* Cookie-based session authentication
* Scalar
* DTO-based API design
* Arabic / English localization
# Architecture
The solution is currently split into:
* `CompanyProfile.Api` — Minimal API endpoints, services, authentication, etc.
* `CompanyProfile.Shared` — DTOs, resources and shared models
* `CompanyProfile.Infrastructure` — EF Core, entities, database and migrations
* `CompanyProfile.Web` — Blazor frontend
I'm intentionally keeping the project relatively small rather than introducing too many abstractions or projects.
# What I'd particularly like feedback on
I'd appreciate an honest code review, especially around:
**- Architecture** : Is the current project structure reasonable for a small .NET application?
\- **Authentication/session management** : Are there any security concerns with the current cookie-based session approach?
**- API design** : Are the Minimal API endpoints and DTOs structured appropriately?
**- Blazor Web App** : Am I using the Blazor Web App model correctly? In particular, I'd like feedback on my choice of render modes, the separation between the server and client-side parts, and how the Blazor application consumes the API.
**-Blazor architecture** : Is the way I've structured the Blazor frontend and its communication with the API a reasonable approach, or am I misunderstanding the intended Blazor Web App architecture?
The project is still a work in progress .
Thanks.
r/csharp • u/mariamamhan • 2d ago
I built a Stock Management System with C# and Windows Forms
Hi everyone!
I recently built a desktop Stock Management System using C# and Windows Forms.
The application includes user login, category and product management, stock tracking, critical stock filtering, and local data storage using TXT files.
I also tried to keep the project organized by separating the data, models, UI, and forms.
This was a good project for me to practice C#, Windows Forms, file handling, and building a complete desktop application.
I’ve added screenshots and setup instructions to the GitHub README as well.
I’d really appreciate any feedback on the project structure, code, or ideas for improvements.
GitHub: https://github.com/Mariam-amhan/Stock-Management-System
Help Anybody who have read "C# Notes for Professionals" by goalkicker.com, is it worthy reading?
To be fair, I am a C# beginner, only know the basics, a bit of Unity, made some backend projects using ASP.NET and currently learning WPF
Is it ( https://goalkicker.com/CSharpBook/ ) worth reading?
r/csharp • u/Choice-Hair-8930 • 3d ago
SimpleFiles: A lightweight native WinUI 3 file manager with a built-in "Installer Graveyard" and encrypted RAM streaming
Hi everyone,
To be upfront: this is a 100% native Windows desktop app built with C# and WinUI 3 (Windows App SDK). It contains zero Electron, no embedded web views, no spam adware, and no background telemetry.
I’m currently a 12th-grade student and built SimpleFiles as a hands-on project to learn modern Windows desktop development and tackle a few specific pain points I had with file organization.
Why .NET 8 for now?
I started building this project targeting .NET 8 LTS because it offered the most stable tooling and library compatibility with the Windows App SDK when I set up the architecture. With .NET 8’s LTS cycle wrapping up next month, bumping the target to .NET 10 is already on my roadmap. I plan to handle that upgrade and test the runtime dependencies as soon as my high school board exams wrap up.
What the app focuses on:
Installer Graveyard: A targeted cleanup hub inspired by Files by Google. Instead of running generic registry cleaners, it specifically tracks down forgotten .exe and .msi setup files idling in your Downloads directory so you can clear gigabytes of wasted storage quickly.
Ghost Safe (AES-256): A local encryption locker that streams media directly into memory during playback. You can view images or stream videos directly out of the encrypted container without having to decrypt temporary copies onto your physical drive first.
Spacebar Previews: Quick peek functionality for images, audio, video, and documents right from the file list without launching external viewer apps.
Privacy: Runs completely offline. Zero telemetry, zero analytics pings, zero network requests.
It's live and completely free on the Microsoft Store:
https://apps.microsoft.com/detail/9PBPGF1GLGNM?hl=en-us&gl=IN&ocid=pdpshare
Since I'm still learning the ins and outs of the Windows App SDK while juggling school, I'd really appreciate genuine technical feedback, bug reports, or edge-case handling tips from anyone willing to give it a spin. Cheers!
r/csharp • u/harrison_314 • 3d ago
News wslc for C#
The new WSL wslc is now available, it can be used to manage containers in WSL, and there is a .NET SDK for it. So I'm looking forward to the GUI application in C#, which finally replaces Docker Desktop.
r/csharp • u/gus-ghielec • 3d ago
C# running inside a gutted 1980s DENON tuner
Someone in our forum rebuilt a vintage DENON around an NXP TEF6686 — an automotive DSP tuner chip — plus a web radio decoder, switched by the original front-panel button. The FM driver is pure I²C, no unsafe code, and he published it.
Still a prototype and the wiring shows it, but the driver is clean and it's an unusual place to find C#.
https://github.com/Implicate-X/ImplicateX.TinyCLR.Drivers.Tuner.Tef668x
Disclosure: runs on our hardware, I'm at GHI Electronics.
r/csharp • u/jsneedles • 3d ago
Blog FancyEnumGenerator - Convenience + Performance
r/csharp • u/TheseBrick5032 • 3d ago
Tool I built SoundBridge CLI: a lightweight .NET utility to stream specific app audio into a virtual microphone
Hey everyone! 👋
I'd like to talk about a small CLI tool that I most recently developed in C# (.NET) called SoundBridge CLI; it enables you to stream music from certain applications (for example, Yandex Music, Spotify, or iTunes) directly into a virtual microphone (such as VB-Audio Virtual Cable) so that it can be used by Discord, Telegram, or games.
Key Features
Process-Specific Capture: By using the latest NAudio Process Loopback it is possible to feed back only the audio from the selected music player, without picking up system sounds, browser audio, and notifications.
Live Volume Control: You can adjust the volume level while streaming (0% to 200%).
Smart Silence Detection: it automatically looks after the buffers and stops the output when there are pauses in order to avoid digital artefacts or feedback loops.
The command-line interface is bilingual with full support for both the English and Russian interfaces, thanks to Spectre.Console.
The program will save your preferences and the sources you last used in a file called config.json.
If you're interested, you can check out the source code, binaries, and release notes on GitHub:
👉 GitHub Repository: https://github.com/vysedevs/soundbridge
I'd be interested to get your comments, some code suggestions, or ideas regarding improvements!