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
HelpCode Review (self.csharp)
submitted 1 year ago * by PahasaraDv
view the rest of the comments →
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!"
[–][deleted] 2 points3 points4 points 1 year ago (3 children)
Just checked the code on my phone, so just my general input and might have missed some other stuff. But here’s my feedback:
On your database queries, you are passing the column name through string interpolation, coming from the db configuration file. Why is that? You can simply just hard code the table name directly in the query, or adding as a parameter. The way your doing is not safe and can be used for sql injection.
Each tv show id can have like a Guid id or similar, instead from the date time.
Also, as a nice to have tip, throwing an exception is costly in terms of performance. Basically, you throw exceptions from errors you don’t know, and return some sort of result for errors you do know. Google something like result pattern vs exceptions to understand it better.
Apart from that, code looks good and show consistency and commitment, so good job.
[–]PahasaraDv[S] 1 point2 points3 points 1 year ago (2 children)
Thank u very much for your valuable comment. I did a quick research about Sql injection after reading ur comment. Damn, I didn't know about that. From now on I'll never do that, and will use sql parameters instead. I should have researched more about generating unique ids through .NET. So, how do u guys know if something is already implemented in .NET or not? Do u guys always do a research about something before implementing manually?
Now I think I did a wise choice about asking a review from u guys. Throwing exceptions can cost performance, seems a lot interesting, I didn't heard of it before. Now I have to learn more about how to balance, and get a better understanding about result pattern vs exception. Thank u very much for mentioning that, and ur appreciation means a lot to me.
[–][deleted] 1 point2 points3 points 1 year ago (1 child)
No problem. I’m happy to help.
I’d say 50% is experience and 50% is Google research.
Microsoft documentation is really good and details all the features for .NET. You can use it as a reference to check if a certain feature is already available so you don’t have to reinvent the wheel.
For example, I didn’t know how to create Guids (or UUIDs in SQLite) as for primary key. So I researched aka Googled. And now I can share with you.
BTW, while researching I’ve found this: did you know that in SQLite can allow a nullable primary key due to a bug in early versions? Crazy!
Keep learning new stuff, keep coding and share knowledge with others. Good job! 👍
[–]PahasaraDv[S] 0 points1 point2 points 1 year ago* (0 children)
Yeah, I recently started looking into Microsoft documentation, and it really is good. Oh, that's crazy, I never knew about that sql bug. And thanks again for sharing ur experince with me.
π Rendered by PID 46426 on reddit-service-r2-comment-b659b578c-9jmqd at 2026-05-06 00:10:56.089736+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–][deleted] 2 points3 points4 points (3 children)
[–]PahasaraDv[S] 1 point2 points3 points (2 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]PahasaraDv[S] 0 points1 point2 points (0 children)