r/dotnet

▲ 0 r/dotnet

How do you guys use Claude (or similar AI) to interact with your MSSQL database?

Hey everyone, I'm working on a .NET 4.6 project with Entity Framework and an MSSQL Server database that's getting pretty complex. We have a bunch of stored procedures that I suspect could use some optimization work, but I'm looking for a better workflow to actually make that happen.

Here's my situation:

  • I have a legacy .NET 4.6 project with EF and a connection string in the config
  • Database has a decent schema with multiple tables and some SPs that are getting slower
  • I've tried using Claude Code to interact with the DB directly, but it can't actually execute queries since it's sandboxed

What I'm trying to achieve: I want to give Claude actual read/execute access to my database so it can:

  1. Analyze the current schema and business logic
  2. Write and test optimized queries
  3. Actually run the queries and compare execution times
  4. Understand the business logic from both the database structure and my C# project
  5. Come back with recommendations or even write the optimized code

My current plan: Use SQLCMD to let Claude execute queries directly against my database, but I'm wondering:

  • How are you guys using Claude or LLM for database work? Are you just sharing schema dumps and asking for optimization tips or do you have something more integrated?
  • What other tools do you use for this kind of DB operations?
  • Have you had success with AI actually optimizing your queries? Or is it more of a "get suggestions and test manually" kind of thing?

I'm open to other approaches too – whether it's exporting execution plans, schema documentation or something else entirely. Just looking for a workflow that actually works in practice.

Appreciate any insights! 🙌

reddit.com
u/pulokjk — 2 hours ago
▲ 12 r/dotnet+1 crossposts

Our Web IDE now exports C#+XAML to native macOS and Linux too (in-browser, WASM) (xaml.io)

Hi everyone,

Quick follow-up to our previous post about Windows .EXE export: xaml.io can now also export to macOS and Linux. So the publish flow now covers all three desktop OSes.

xaml.io exports your C# + XAML project to a native binary for each platform:
• Windows .exe
• macOS .app bundle (ad-hoc signed)
• Linux executable (x86_64)

A few details that might be interesting to this sub:

• The whole toolchain still runs in the browser via WebAssembly. No backend compile step, nothing uploaded to a server. Your code stays local.

• What runs where, to head off a common question: the WebAssembly part is only the IDE itself. The desktop apps it produces are real native .NET processes. Your C# runs as native code in-process (same as a WPF or WinForms app). The process embeds the OS's built-in WebView (Edge WebView2 on Windows, WKWebView on macOS, WebKitGTK on Linux) via Photino purely as the UI rendering surface. Not Electron-style, not WASM at runtime.

• The macOS ad-hoc code-signing happens client-side too, in WASM. We ended up vendoring a small subset of Filip Navara's Melanzana (.NET Mach-O writer + CodeDirectory hasher) and lazy-loading it so non-Mac users don't pay for the bytes on first paint. This client-side code-signing was the part we weren't sure was possible until we got it working.

• Still no install, no signup (unless you want to save to the cloud or use AI).

• It's free.

Honest caveats up front:

• Apps are unsigned in the "publisher identity" sense (no Apple Developer ID, no Windows Authenticode), so first-launch warnings on macOS Gatekeeper and Windows SmartScreen still apply. The bundled README has the bypass for each. Support for user-supplied code-signing certificates is on the way.

• macOS is Apple Silicon (arm64) only for now. Linux is x86_64 only.

• Linux uses WebKitGTK 4.1 (preinstalled on Ubuntu 22.04+, Debian 12+, Fedora 38+, Arch). Older distros may need a one-time install. The bundled README has the package names.

If you've tried xaml.io and bounced off, still genuinely curious what was missing. Bug reports and "this is still missing X" feedback both welcome. We read everything that gets posted here.

Thanks!

u/Userware — 1 hour ago
▲ 0 r/dotnet

Handling multiple lookup tables(dropdown data) via a single dynamic endpoint in vertical slice architecture?

hey everyone,

before I start, please go easy on me. I'm about a year and a half into c#/.NET and considering myself junior to mid-level dev.

I'm working on a project using fastendpoints and vertical slice architecture, and I'm hitting a bit of a boilerplate wall with lookup tables/entities like payment methods, marital statuses, genders, etc which are almost always just an id and name used to populate dropdowns in the frontend.

right now, creating a separate endpoint, request/response dto, data fetching for every single lookup table creates a lot of repetitive code and feels kinda overkill.

specially with layered architecture, creating controllers, services, repos, etc for every lookup entity and injecting them in program.cs.

I'm considering consolidating this into a single generic feature slice with a route like GET /api/lookups/{type} and map the {type} string to the corresponding database table in the handler.

but before I do that , I wanted to get your thoughts on the pros and cons of this approach.

EDIT: thanks for the quick replies, everyone. but my question wasn't clear enough for some of you so here's a more detailed explanation:

the tables are used to enforce data integrity and avoid user spelling errors, and some are used for business logic in the backend. the frontend fetches these for dropdowns, and the chosen id is stored as a foreign key for the main domain tables.

the database design looks something like:

  1. lookup tables(the ones i want to consolidate) which are simple Id/Name tables.
    Example: EducationLevel table: [{id:1, name:"BSc"},{id:2, name:"MSc"}], PaymentMethod table: [{id:1, Name:"Cash"}, {id:2, name:"card"}, {id:3, name:"bank transfer}], ApplicationStatuse table:[{id:1, name:"pending"}, {id:2, name:"approved"}]

  2. the main domain tables with foreign keys which reference the lookup table ids
    Example: ApplicationForm table: {id, applicantName, educationLevelId, applicationStatusId}, Payment table: {id, amount, paymentMethodId}.

i've a number of similar lookup tables and the code got repetitive. so my question is, instead of creating separate endpoints, request/response dtos, data access or slice like: GET /api/education-levels, GET /api/payment-methods, GET /api/application-statuses, i want to create one generic endpoint slice in the project like GET /api/lookups/{type}. this way the frontend calls GET /api/lookups/education-levels and the endpoint checks the route param, queries the education-level table, maps it to a generic List<LookupResponse>, and returns it. and does the same for other lookup entities.

is routing everything through api/lookups/{type} a clean to handle these simple fk dropdowns or does it hurt long term?

reddit.com
u/Getch_2067 — 5 hours ago
▲ 31 r/dotnet

As Nuke is dead, is Cake the only alternative?

Hi, as Nuke is dead since a few months now, I’m wondering if Cake is the only alternative available. Funnily enough, I just migrated a project from cake to nuke a day before the decease of it was announced.

I did some googling and still there are so many articles suggesting nuke over cake so that I wonder why there isn’t more I can read about it not being maintained any longer.

Also there seems to be no fork which has be designated as a successor to the official version.

So either I’ve done something totally wrong being so dependent on it or everybody migrated happily to cake.

Or is everybody using the cli tools directly?

I found nuke extremely helpful by having a clear picture of what the build is doing.

Any recommendations or suggestions?

reddit.com
u/yankun0567 — 1 day ago
▲ 9 r/dotnet+2 crossposts

Debug Your Game in Real-Time with Dear ImGui

My brother and I recently started a new podcast called Quest to Compile. We cover game development with a .NET focus and just put out an episode on Dear ImGui.If you're not familiar, it's an open source library built for creating debug and dev tooling that you can use at runtime. We go through what it is and how to get started with it.

We're also looking for ideas on topics to cover next or even guests to have on the podcast. Is there anything you'd love to have us cover?

aka.ms/quest-to-compile

youtube.com
u/yecats131 — 1 day ago
▲ 0 r/dotnet

Why are nobody talking about SQL4CDS?

Don't get me wrong, it's not hard to find on google, but since I started developing for a small NGO with a dataverse backend, this tool has been absolutely indispensable to me - so much that when I migrated from windows to Linux, I took the time to write my own linux compatible cli-wrapper (based on Mark Carrington's package) to be able to continue using it.

Am I missing something? How do other people query and inspect dataverse data? I refuse to believe that people just inspect it through a Dynamics app or with hand-written fetchXML (god I hate it). Is it just that our backend is decades behind, and nobody uses dataverse anymore? I'm fairly new to this (1.5 yes or so) and I'm the sole dev in here, so I don't have a Mr. Miyagi to show me the ropes hah.

reddit.com
u/Byttemos — 1 day ago
▲ 54 r/dotnet

Does anybody do the .AddApplicationServices thing in real projects?

Ive been seeing this pattern for a while, in all kinds of sample architecture templates like this one here.

The pattern is instead of registering everything in program.cs, you extract it and have 10 places with 50 lines of registration code, instead of 1 place with 500 lines of registration code.

The same pattern you can do in a DbContext with OnModelCreating. You can either do it all in one file, or split it up.

In real projects I pretty much only see the all in one file approach. I think it makes more sense too, its more honest. Some classes are just big. If I have 100 tables, im gonna have 100 db sets and probably like 1000 lines of model configuration.

Do you find it annoying in real life projects? Or is it just fine? Do you think its better to split? Does it lead to philisophical discussions?

u/Venisol — 2 days ago
▲ 34 r/dotnet

Struggling to Get Interviews as a Junior/Mid-Level Software Developer. Is the Market Really This Bad?

I’ve been applying for junior and mid-level software developer roles for almost a year now, and honestly, it’s becoming really frustrating. It feels like complete silence from the recruiter side. I apply consistently, tailor my resume when I can, and still barely get responses or interviews.

At this point, I’m starting to wonder:

* Are recruiters filtering out resumes automatically?
* Is it harder for backend/.NET developers specifically?

I’d really appreciate honest advice from people who were in a similar situation and eventually broke through. What helped you get interviews or improve your application process?

Thanks in advance.

Edit: I have 3 years of experience as a .NET developer.

reddit.com
u/Ok_Tailor2202 — 3 days ago
▲ 3 r/dotnet

I open-sourced the .NET/Avalonia desktop workspace I’ve been building

https://preview.redd.it/2sl156mq4c2h1.png?width=3440&format=png&auto=webp&s=cf3adcc4275065ad06267b4f4a4413625451f3eb

Hey r/dotnet,

I wanted to share a project I’ve been building for a while
It started from a small frustration I kept having with desktop/workspace apps

I use a mix of tools every day: editor, terminal, AI chats, scripts, dashboards, notes, local services, and random utilities. Most of them are good on their own, but I often wished I had one desktop workspace that I could shape around my workflow instead of constantly jumping between apps.

So I started building Sunder.

The idea is simple:
Start with a desktop shell, then add capabilities through installable packages.

It’s built with .NET and Avalonia, and the core repo includes:

- Desktop app
- Local runtime host
- CLI
- Package SDK
- Package templates
- MSBuild package tooling
- `.sunderpkg` package format
- Package validation/install/update flow

The part I spent the most time thinking about was the package system.

I didn’t want packages to reference the app internals directly, so packages use a public SDK layer. They can contribute UI views, settings pages, background services, extensions, configuration, secrets, storage, logging, and other runtime capabilities.

Package metadata is declared in C# with assembly attributes, and the build tooling generates the manifest/dev output/archive.

The first package family I built is AI-agent oriented, because that was the workflow I personally needed first. It has local agent sessions, profiles, model providers, file/shell/web tools, local and Docker execution, MCP, memory, skills, and subagents.

But Sunder itself is not meant to be only an AI app.

The part I care about more is the platform idea. In theory, packages could add developer tools, dashboards, automations, internal tools, research workflows, personal tools, or completely different workspace experiences.

It’s still early and definitely not perfect. I’m sure there are things I’ll need to rethink, especially around package boundaries, SDK design, and runtime behavior.

But it’s open-source now, and I thought this subreddit might find the .NET/Avalonia side interesting.

GitHub:
Sunder Core: https://github.com/Younics/sunder-core
Sunder Agent Packages: https://github.com/Younics/sunder-agent-package

I’d really appreciate feedback from people who have worked on desktop apps, plugin systems, Avalonia apps, SDKs, or local runtimes.

A few things I’m especially curious about:

- What would you be careful about in a package/plugin system like this?
- Would you approach this differently in .NET?
- What kind of package would you expect a workspace like this to support first?

Any feedback or criticism is welcome : )

reddit.com
u/Wreit — 2 days ago
▲ 1 r/dotnet+1 crossposts

Creating a WhatsApp chatbots

Hey Reddit and community so i'm basically a .NET Developer. And i also love to build a Telegram chat bots for automatization some things. And i'm wondering, if exist maybe any similar packages for creating chat bots but specially for WhatsApp? (P.s i read about some of them In the internet, but it's interesting to listen opinion from real people which actually working with this)

reddit.com
u/gnatykdm — 2 days ago
▲ 3 r/dotnet

.NET open source rewrite for RISC 5?

I've been looking into archs lately and RISC 5 seems fascinating (coz not bound by x86/64-ARM costly duopoly)

Ubuntu already supports it and .NET being open source means, we could too right? Since msft seems to ignore it

Even if it's inefficient af, it wont matter coz RISC 5 CPUs are anyway in their infancy so it'd be more of a "at least it works" and won't that be fun?

PS: "rewrite" would be the wrong word but y'all get the point

reddit.com
u/wannabe_isekai — 2 days ago
▲ 45 r/dotnet+1 crossposts

Is C# a deal breaker for Big Tech SDE roles?

I’ve been working primarily with C#/.NET for the last few years and honestly it’s the language I’m most fluent in. I can build systems in it without even thinking much.

But lately I keep seeing a lot of hate online toward C#/.NET, especially from some SDEs, startup people, and even recruiters. I even see people calling it “C Hash” instead of C sharp 😭

It’s making me wonder:

  • Is being a C# backend engineer hurting my profile?
  • Is it harder to get shortlisted for product companies because of it?
  • Do companies like FAANG/high-growth startups prefer Java/Go engineers significantly more?
  • Would C# ever become a deal breaker during interviews?

For context:

  • I do know some Java and Go as well
  • I work mainly on backend/distributed systems
  • Recently trying to move toward stronger backend/cloud/product roles

Would appreciate honest opinions from people already working in backend engineering roles especially big tech.

reddit.com
u/Former-Manager-4430 — 3 days ago
▲ 0 r/dotnet

Recently got hired as a .NET developer, how do I fill the gaps before I start?

I just landed a job as a .NET developer and I want to prepare in advance. I start in 3 months. They'll train me technically, but I learn best by understanding things myself first and then asking questions. I don't want to just go "monkey see, monkey do," ship it, and forget everything a week later.

Here's where I'm at:

  • I know C# the language reasonably well, and I understand OOP and SOLID.
  • In university I used C#, .NET Core, and .NET 6 at most.
  • I've also worked with Java (Spring / Spring Boot) and Python for backend.
  • For frontend I mostly use React + TypeScript now, but before that I built UIs with Web Forms and Razor Pages.

My actual struggle is with .NET as an ecosystem rather than the language. There are a lot of layers, and I don't know how they connect : DI, middleware, the request pipeline, EF Core, project structure, configuration, etc. I can read about each piece in isolation, but I'm missing the mental model of how it all fits together in a real application.

So my questions:

  1. What's the best way to build that "how it all connects" mental model?
  2. Are there resources (courses, books, repos, sample projects) you'd recommend for someone who knows C# but not the wider .NET stack?
  3. What concepts are most worth nailing before day one vs. things I can safely pick up on the job?

Thanks in advance.

reddit.com
u/PotatoLover400 — 2 days ago
▲ 62 r/dotnet

What are you using for observability in .NET?

Hey, I’m curious what people here are using for observability in .NET apps.

Are you using something hosted like Datadog, Sentry, New Relic, Dash0, etc., or did you go with your own Grafana/Loki/Tempo/Prometheus/OpenTelemetry setup?

Mostly wondering what worked well in practice, and what parts were annoying - backend, frontend, or both.

Stuff like setup, debugging, pricing, maintenance, vendor lock-in, etc.

Would you pick the same stack again?

reddit.com
u/Aggressive-Towel7731 — 3 days ago
▲ 9 r/dotnet

Is there actually any legal reason why ImageSharp can't be perpetually forked and offered without a licence file requirement?

There's no way for me to make this post without pissing off some people here, so I'm going to accept it will get a bunch of hate. But I am not really trying to annoy people, however I do have rather strong views about the new behaviour of ImageSharp version 4 (you can't build with it without a licence file). It would be nice if people could read and consider this whole post calmly and not reflexively vote it down but my hopes aren't high.

Inb4 "Why are you so ungrateful, ImageSharp is a lot of work and they deserve to make a living": I'm not rich and I want to use ImageSharp for a personal project to keep my coding skills fresh. I will not be some big company making loads of money off it. Morally, I think it's a dick move of them to get the library really popular on the back of easily being able to use it in a personal project and then suddenly put a big roadblock in place for ANYBODY using it, even people who aren't rich companies. Also, if every NuGet package did this it would become practically unusable. Having to request and wait for days on a licence file before being each to use each NuGet package? Talk about the bad old days of software development. And by the way, for the community licence application, I've only just started developing the project, what am I meant to do? Upload a Hello World program to a public repo, point them at that, and request the licence?

Anyway, the main question I have is: as far as I can tell, ImageSharp is opensource. Is there any technical or legal reason why one couldn't fork it, call your fork "an Open Source work that consumes ImageSharp", and remove the licence file requirement as part of the build process?

reddit.com
u/jez999 — 3 days ago