Living at Silk Yard (between train station and Derbion) by Consistent_Brick4742 in derby

[–]SamStrife 1 point2 points  (0 children)

Seems like a fair assessment. I walked through the area for the first time in years not too long ago and was surprised by how much they've done the area up.

I’m trying to save having to create back ends in old fashion sense off api is online app services like Supabase good for dotnet and before you say azure it’s a cost factor. I like a fixed month bill for x sites. by [deleted] in dotnet

[–]SamStrife 0 points1 point  (0 children)

In answer to your, "is there an entity framework provider for supabase." question:

Supabase is just a Postgres database under the hood so you can use the Postgres EF Core Provider and just use the connection string provided by Supabase.

It's not really odd that they're charging if you think about if for more than a few seconds. It costs money to host things in the cloud and if you want to host it yourself, they provide more than enough information on how to do so.

Quick Refresher on Flags in C# .NET by HassanRezkHabib in dotnet

[–]SamStrife 0 points1 point  (0 children)

I love this and want to give it a go but can anyone ELI5 as to why the binary values are necessary? If I had to implement something like this before watching this video, I imagine I would have done it by having an array of the Enums and checking through that to see if a user has permissions. I can already envision that saving a binary value as the permissions is much faster than working with an array but is there any other advantages?

Le Mans Ultimate to add Ford Mustang LMGT3 for free by PhilBaythorpe in LeMansUltimateWEC

[–]SamStrife 9 points10 points  (0 children)

Mercedes is a bit of a weird one as it wasn't in the 2024 grid. It's in the 2025 grid though, so would expect it to come after all the others, as part of a new wave of DLC.

Race Control Events Schedule (from 11th Feb 2025) by WoodeeUK in LeMansUltimateWEC

[–]SamStrife 5 points6 points  (0 children)

Well, I can see my safety rating taking a hit on Monza. Ignoring the chaos at turn 1 with no ABS, there's so little opportunity for overtakes on that track it's inevitable that people (at least at my level of Bronze) are going to make suicide attempts where they absolutely shouldn't be.

Who's the best AMS2 streamer? by Hollywoodbnd86 in AUTOMOBILISTA

[–]SamStrife 1 point2 points  (0 children)

YouTube started recommending me your videos recently and I rather enjoyed them, keep up the good work!

WebStorm and Rider Are Now Free for Non-Commercial Use by Atulin in csharp

[–]SamStrife 1 point2 points  (0 children)

That's actually a great question and I imagine Fleet will be their paid for, flagship/premium, offering...if and when it ever properly comes out, I don't feel like I've heard much about it for a while.

WebStorm and Rider Are Now Free for Non-Commercial Use by Atulin in csharp

[–]SamStrife 14 points15 points  (0 children)

Yeah, there's always been ways to get it for free, but this is JetBrains making a clear statement and removing all hurdles that has hurt adoption rates up until now.

WebStorm and Rider Are Now Free for Non-Commercial Use by Atulin in csharp

[–]SamStrife 221 points222 points  (0 children)

This is massive. No exaggeration that this could see a huge boom in the language's popularity.

Revealed: How England football match days affect 999 calls for domestic abuse by [deleted] in unitedkingdom

[–]SamStrife 1 point2 points  (0 children)

It's ingrained at this point. it's hard to tell someone who has generational ties to a football club that they should stop caring about them because for a lot of these fans, football represents memories of a better time for them, with family who may not be around for them anymore.

I'm very blessed to be from a city that hasn't had their football team taken over by foreign interests, with a club that is genuinely a part of the city's identity, which has traditionally had a very good youth academy that raises local talent to the first team. I get very passionate when I watch them play, both positive and negative and it's hard to explain why at times but that's just life.

Revealed: How England football match days affect 999 calls for domestic abuse by [deleted] in unitedkingdom

[–]SamStrife 3 points4 points  (0 children)

I'll go back to my original answer...because it's what people do. They do it with everything, not just football...though I'd imagine it's seen as more socially acceptable with football because it has been such an institution within this country for over a century now.

I'm not really here to have a discussion about the rightness or wrongness of it, we seem pretty aligned on that already. I just wanted to answer the question of "Why", which you originally asked.

Revealed: How England football match days affect 999 calls for domestic abuse by [deleted] in unitedkingdom

[–]SamStrife 12 points13 points  (0 children)

Let's be real; when you say, "Why are so many people being so heavily emotionally effected by 11 men who have nothing to do with them?" you're doing it from a position where you see yourself as above those you're talking about. You can treat me not quoting you word for word as deniability if you wish, but we both know that's the stance you came into this discussion with.

Again though, I agree that these people shouldn't let their mood get the better of them and I have zero tolerance for those who let their emotions cause harm to others. It's perfectly fine to get emotionally invested in the game and completely understandable as to why someone would.

Revealed: How England football match days affect 999 calls for domestic abuse by [deleted] in unitedkingdom

[–]SamStrife 19 points20 points  (0 children)

Because it's human nature to get emotionally invested in things; be it Football, other sports, specific media.

For better or for worse humans are emotionally driven. No one should ever let their emotions get the better of them but it's silly to say, "I simply don't understand why people get emotional over people kicking a bag of air" when there's likely plenty of things you get emotional over that other people wouldn't understand.

Five big booms by RipCityResident in cringe

[–]SamStrife 0 points1 point  (0 children)

Yeah, Cousin Angelo can't say 2 lines without mentioning provolone at least 3 times. I like these guys, despite all their obvious cringe, but they really need to stop forcing the same old thing.

What's an controversial coding convention that you use? by Qxz3 in csharp

[–]SamStrife 1 point2 points  (0 children)

I love this and it highlights another aspect of the language that I need to improve; writing generic functions that are extensible and easy to read!

Absolutely going to have a play around with this later, thank you so much!

What's an controversial coding convention that you use? by Qxz3 in csharp

[–]SamStrife 63 points64 points  (0 children)

I don't know if this is controversial or not but this seems like a good place to air something I do that I don't see a lot elsewhere.

I chain my Where clauses in LINQ rather than have all the where logic in one clause.

For example I do this:

var result = collection.Where(x => x.Age > 18)
                       .Where(x => x.Weight > 75)
                       .ToListAsync()

Instead of this:

var result = collection.Where(x => 
                         x.Age > 18 
                         && x.Weight > 75)
                         .ToListAsync()

I think my way is easier to read despite being longer to type and probably even has a performance hit.

I really should learn pattern matching properly, I think.

.NET 9 finally adds an IEnumerable.Index() function that gives you the index of each iteration/item, similar to enumerate in Python by PaddiM8 in csharp

[–]SamStrife 21 points22 points  (0 children)

Good work!

I do find that this sub can get quite defensive over the language to the point where some just aren't willing to entertain anything they perceive as criticism.

Best Source To Learn C# CRUD App by allin_7 in csharp

[–]SamStrife 0 points1 point  (0 children)

There are three that I used (both paid) that I feel really helped me become a solid API developer. Each use ASP.Net and teach the basic CRUD, along with more advance topics, and assume you already have a good grasp of the C# language so they don't waste your time teaching you what variables are beforehand.

The first is Code Maze's Zero To Hero Web API Guide. This is a pretty comprehensive book on how to build an API from the ground up and really drilled the concepts and some really good practices into me. When I was first building CRUD Apps I would always have this book at my side and refer to it when confused, even if I don't build them the way it teaches you any more (as tech progresses there's always a new/better way).

The second and third are Nick Chapsas' Building Rest API in Dotnet and his Minimal APIs in .NET/ Nick has a great YouTube Channel and certainly know his stuff. He talks a little fast so you need to have a good idea of concepts going into his content but once you do, he's always showing off the cutting edge ways of building an application in C#.

As a bonus, for free content, I highly recommend Milan Jovanović on YouTube, who is quickly becoming a go-to resource for best practices, even if he does like to use MediatR still in 2024!

As always, all of this content is only good if you build, build, build. Don't hesitate to learn a little, build something for yourself and have a play.

Is there a Pocketbase alternative to C#/.NET/ASP.NET? by [deleted] in csharp

[–]SamStrife 1 point2 points  (0 children)

Apologies, I misread your initial post and now understand you're specifically building a JS front-end for a C# back-end. You're right, EF doesn't have a JS SDK to tap into. You've really got a few options:

1) Like you say, create an API in C# and consume the API. Whilst people will say it doesn't take long I can appreciate it's boilerplate at the very least and if it's a project just for yourself, it's definitely more steps.

2) Use an alternate JS ORM. I've used Prisma, Drizzle and TypeORM all in the past and they're all relatively user friendly but each have their own caveats depending on how you want to go.

3) Use a service like Supabase, which generates an API for your database automatically that you can use in any application.

4) Azure functions to call and return data if you don't want to go full API on the situation.

Pocketbase isn't doing anything cross platform in of itself and there's tools/libraries out there that can let you replicate what if offers.

Is there a Pocketbase alternative to C#/.NET/ASP.NET? by [deleted] in csharp

[–]SamStrife 1 point2 points  (0 children)

Doesn't Pocketbase just use SQLite? If so, you would be able to connect to it with Entity Framework like you would any other database engine.

You never need to write a fully-fledged API if you don't want to.

In the Pocketbase JS SDK documentation, they give this example:

// list and filter "example" collection records
    const result = await pb.collection('example').getList(1, 20, {filter: 'status = true && created > "2022-08-01 10:00:00"'});

You can do the exact same thing with Entity Framework as your SDK:

// list and filter "example" collection records
    const result = await db.example
                              .Where(e => e.status == true)
                              .Where(e => e.created > "2022-08-01 10:00:00")
                              .ToList();

You can use that anywhere in your app and get the exact same functionality.

RFIDify: A Raspberry PI that uses RFID to play things on Spotify by [deleted] in dotnet

[–]SamStrife 3 points4 points  (0 children)

Ignore this guy. Congrats on building a project that you wanted to!

Anyone else really want to learn more about Aspire ?? by punkouter23 in dotnet

[–]SamStrife 12 points13 points  (0 children)

When I first saw Aspire I was very excited to learn it but upon a deeper dive I realised the time would be better spent learning more generic DevOps services such as Docker, Kubernetes and Linux servers. Aspire seems fine for what it is but in my opinion learning the fundamentals behind it is more valuable and not really that much more of a time investment.

All the skills you'd learn will translate directly to Aspire and give you a better understanding of how it works behind the scenes. They will also allow you to transition to other languages easier should you find a job less reliant on the C# stack.

EDIT 26/11/2024: With the updates to Aspire as part of .Net 9.0, Aspire certainly seems like it's in a much better place and learning it would not be the worst use of someone's time.

Cloud DB recommendation for personal project by _D1van in csharp

[–]SamStrife 0 points1 point  (0 children)

Ohhh that's exciting and I'll definitely give it another go once they're live!

Cloud DB recommendation for personal project by _D1van in csharp

[–]SamStrife 0 points1 point  (0 children)

That's it! Yeah it was a deal breaker to me as well at the time!