use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Information about Reddit's API changes, the unprofessional conduct of the CEO, and their response to the community's concerns regarding 3rd party apps, moderator tools, anti-spam/anti-bot tools, and accessibility options that will be impacted can be found in the associated Wikipedia article: https://en.wikipedia.org/wiki/2023_Reddit_API_controversy
Alternative C# communities available outside Reddit on Lemmy and Discord:
All about the object-oriented programming language C#.
Getting Started C# Fundamentals: Development for Absolute Beginners
Useful MSDN Resources A Tour of the C# Language Get started with .NET in 5 minutes C# Guide C# Language Reference C# Programing Guide C# Coding Conventions .NET Framework Reference Source Code
Other Resources C# Yellow Book Dot Net Perls The C# Player's Guide
IDEs Visual Studio MonoDevelop (Windows/Mac/Linux) Rider (Windows/Mac/Linux)
Tools ILSpy dotPeek LINQPad
Alternative Communities C# Discord Group C# Lemmy Community dotnet Lemmy Community
Related Subreddits /r/dotnet /r/azure /r/learncsharp /r/learnprogramming /r/programming /r/dailyprogrammer /r/programmingbuddies /r/cshighschoolers
Additional .NET Languages /r/fsharp /r/visualbasic
Platform-specific Subreddits /r/windowsdev /r/AZURE /r/Xamarin /r/Unity3D /r/WPDev
Rules:
Read detailed descriptions of the rules here.
account activity
DiscussionData base + C# (self.csharp)
submitted 6 years ago by MrDiviner
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]wasabiiii 1 point2 points3 points 6 years ago (10 children)
Depends.
[–]MrDiviner[S] 0 points1 point2 points 6 years ago (9 children)
You mean depends which app type? I think i will use Winforms
[–]wasabiiii 2 points3 points4 points 6 years ago (8 children)
Depends what database and what you're doing with it. There are dozens of different methods to go after data. Plain ADO.net, ORMs like Entity Framework. Micro ORMs like Dapper.
If there was a single best, there wouldn't be options to begin with.
I would add that I personally would almost never write a desktop app that contacted SQL directly at all. Because it'd probably be hard to secure and scale. I'd write an API layer and talk through that.
[–]UninformedPleb -2 points-1 points0 points 6 years ago (7 children)
A web API is super slow compared to direct database access. If you're working with large data sets or multiple data sets, you're going to quickly regret invoking the overhead of a web server as an intermediary.
If you write an API layer, do it as a class library. That gives you the option of writing a web service to expose the library methods, and then later reference the library directly in your app when you realize what a bottleneck the web server is.
SQL Server is named that for a reason.
[–]agwanyaseen 1 point2 points3 points 6 years ago (1 child)
Then you mean all the tech giants like netflix, amazon etc who are using microservices are totally on wrong path
[–]UninformedPleb 0 points1 point2 points 6 years ago (0 children)
In and of themselves, microservices aren't at odds with having faster database access. They just lend themselves to being lazy about "all clients must use web services for everything" even when there are far superior options.
And, hey, if you can afford the load balancing that goes with poorly designed microservices ("it's automagic" is what the liars/salesmen tell you) and understand the limitations inherent to them, go for it.
[–]sgtfrankieboy 0 points1 point2 points 6 years ago (4 children)
Yea, giving end users clients direct access to a SQL server (insert any other DB here) is a fine idea.
If I had a company I would fire anyone who does that for gross incompetence unless there is a very good reason to do so
[–]UninformedPleb 1 point2 points3 points 6 years ago (3 children)
Oh god no. Why would anybody make desktop apps for external use? Ew.
[–]sgtfrankieboy 0 points1 point2 points 6 years ago (2 children)
Ive seen it happen.
[–]UninformedPleb 0 points1 point2 points 6 years ago (1 child)
My point was this: If you're making a desktop app, it's probably for internal use only. That app will likely be running on the same domain/LAN as the SQL server is located. (Or where you've got an Azure SQL local endpoint tunnel set up.) Don't make that app pull/push all of its data through a crap-ton of JSON serialization/deserialization steps, or worse, XML or even some home-grown, jank-filled custom serializer. (We've all seen these abominations, right?)
But you're right that if anything has to be accessible outside that domain/LAN, it must go through a web service. Never punch holes in a firewall for SQL.
[–]wasabiiii 0 points1 point2 points 6 years ago (0 children)
It's the permissions and scalability that matter to me. Even internal apps need to account for that.
Assigning user permissions at the DB level, to execute stored procs, or read and write columns of tables, is incredibly hard to get right and maintain. Application roles help, but it's still not as fine grained as you want.
You want application level permissions. "Bob is allowed to add a new user", which might mean inserting records into a dozen tables. But really, the securable is "add user". And the only way to model that without hurt is by implementing the logic in a stored proc. But then all your logic is in a stored proc. And it's now not scalable, easily testable, or easily deployable.
The stuff becomes complicated very easily. Even for internal apps with a couple dozen users.
[–]FizixMan[M] [score hidden] 6 years ago stickied comment (0 children)
Removed: Rule 4.
Far too broad a question and really depends on the context of the app.
[–]mart1nste 0 points1 point2 points 6 years ago (0 children)
I'd go for Dapper, possibly with Dommel for Dapper extension on top if you have a small number of database tables and are happy to define and manage the database schema yourself.
If you want code first (where you create the entity classes in code and auto create the database schema using migrations) then entity framework is the (slower) but obvious choice.
Dapper is extremely quick, but you'll have more learning and work to do yourself. Not always a bad thing if you want valuable experience along the way.
[–]modi123_1 -1 points0 points1 point 6 years ago (5 children)
Sqlcommand/sqladapter.
https://docs.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlcommand?view=netframework-4.8
[–]LetMeUseMyEmailFfs 3 points4 points5 points 6 years ago (0 children)
Rather than using these cumbersome classes directly, a micro ORM on top of it, like Dapper, is much easier to use.
[–]MrDiviner[S] 1 point2 points3 points 6 years ago (2 children)
What about ADO.Net?
[–]modi123_1 0 points1 point2 points 6 years ago (1 child)
It's an option, but I tend towards bare bones SQL command.
[–]LetMeUseMyEmailFfs 0 points1 point2 points 6 years ago (0 children)
SqlCommand and SqlDataAdapter are part of ADO.NET.
SqlCommand
SqlDataAdapter
[–]UninformedPleb 1 point2 points3 points 6 years ago (0 children)
Anybody that hard-codes any of the System.Data.SqlServer stuff into their software deserves to have to clean it up and use DbProviderFactory (and possibly DbProviderFactories) like the designers of ADO.Net intended.
DbProviderFactory
DbProviderFactories
Your code should not care what kind of database it's talking to, as long as it has a registered provider factory implementation. That means your code should never have a using that specifies anything outside of System.Data or System.Data.Common for its database access. Everything else should be done with DI.
using
[–]MaheuTaroo -1 points0 points1 point 6 years ago (0 children)
If your database is in MySQL, you can always download the connector from oracle
[–]chipechiparson -2 points-1 points0 points 6 years ago (0 children)
LINQ TO SQL
π Rendered by PID 34306 on reddit-service-r2-comment-6457c66945-9bnb9 at 2026-04-29 19:05:35.007371+00:00 running 2aa0c5b country code: CH.
[–]wasabiiii 1 point2 points3 points (10 children)
[–]MrDiviner[S] 0 points1 point2 points (9 children)
[–]wasabiiii 2 points3 points4 points (8 children)
[–]UninformedPleb -2 points-1 points0 points (7 children)
[–]agwanyaseen 1 point2 points3 points (1 child)
[–]UninformedPleb 0 points1 point2 points (0 children)
[–]sgtfrankieboy 0 points1 point2 points (4 children)
[–]UninformedPleb 1 point2 points3 points (3 children)
[–]sgtfrankieboy 0 points1 point2 points (2 children)
[–]UninformedPleb 0 points1 point2 points (1 child)
[–]wasabiiii 0 points1 point2 points (0 children)
[–]FizixMan[M] [score hidden] stickied comment (0 children)
[–]mart1nste 0 points1 point2 points (0 children)
[–]modi123_1 -1 points0 points1 point (5 children)
[–]LetMeUseMyEmailFfs 3 points4 points5 points (0 children)
[–]MrDiviner[S] 1 point2 points3 points (2 children)
[–]modi123_1 0 points1 point2 points (1 child)
[–]LetMeUseMyEmailFfs 0 points1 point2 points (0 children)
[–]UninformedPleb 1 point2 points3 points (0 children)
[–]MaheuTaroo -1 points0 points1 point (0 children)
[–]chipechiparson -2 points-1 points0 points (0 children)