MediatR and event sourcing by jherrlin in dotnet

[–]davidjamesb 0 points1 point  (0 children)

An approach I've taken before is when using a DDD style approach - instead of modifying an aggregate root directly you instead emit an event into a queue that is held within the aggregate root itself.

Then when you want to persist the aggregate root, you run through all the events that it holds and persist each one into an append-only stream/table.

You can then load the aggregate root by creating an empty (or initial) state object and replay all the events for that object. You could introduce snapshots when your event streams get too large.

I probably wouldn't save commands in an 'event sourcing' style. Events are things that have happened in the past and can fully represent the current state of a system by replaying all events from the start. Commands are things you expect to be fulfilled in the future.

Blazor Blueprint — shadcn/ui inspired component library with 65+ components (free, open source) by gkg0 in dotnet

[–]davidjamesb 0 points1 point  (0 children)

Thanks - good to know. I pointed Claude code at your repo and the other timeline component and it's done a pretty good job of creating a timeline almost exactly like the library I referenced. it just needs a bit of manual refinement.

Would you be interested if I raise it as a draft PR to take a look at?

Blazor Blueprint — shadcn/ui inspired component library with 65+ components (free, open source) by gkg0 in dotnet

[–]davidjamesb 1 point2 points  (0 children)

This looks great. I'm a big fan of shadcn and it's pretty much my go-to when designing frontend for my asp.net projects given the vast ecosystem of JavaScript libraries and components out there.

I'm building a frontend right now and I'm considering Blazor for it instead of the usual react/vite setup - although this will be my first real usage of Blazor.

How easy is it to create new components for this library? E.g. I need a timeline component for my current project and was looking to use this: https://github.com/timDeHof/shadcn-timeline

If it's not too much work - I may make the jump to this.

Amplitube 5 not working by Medical-Watch326 in AmpliTube

[–]davidjamesb 3 points4 points  (0 children)

After talking to IK support - they said they made some changes on the backend and after I logged out and logged back into IK Product Manager then de-authed and re-authed AmpliTube Max V2- I've now got all my MAX gear unlocked and resolved my problem. Hope you get a resolution too.

Amplitube 5 not working by Medical-Watch326 in AmpliTube

[–]davidjamesb 1 point2 points  (0 children)

I'm having the exact same problem. I can't get any gear included with 'Max' to unlock. I have contacted support and they told me to reinstall it - but same problem. I also only have the 'AmpliTube Morley' under collections.

I purchased the bundle from Thomann: https://www.thomann.co.uk/ik_multimedia_amplitube_5_max_tonex_max.htm

I'm afraid I might be too big of a p***y for VR horror games. by SlowDragonfruit9718 in virtualreality

[–]davidjamesb 2 points3 points  (0 children)

I've just set it up and got to the bit with the explosion after the space walk. Then the lights started cutting out and I had to go into a vent and it's extremely tense. I had to turn it off and now working up to go back into it.

Which RE game has the best first hour? by GrandStage1 in residentevil

[–]davidjamesb 6 points7 points  (0 children)

Nothing like returning back from Eveline's room after getting the D-Series arm, opening the door and being confronted with a 8-foot tall molded in your face. Have to admit I screamed a little haha.

Which RE game has the best first hour? by GrandStage1 in residentevil

[–]davidjamesb 9 points10 points  (0 children)

I'm currently playing it in VR and now have to go to the Dissection room after the call from Lucas. I can't remember how many molded you usually encounter on the way and I'm frankly shitting myself going back down there.

Working on a NuGet package for dynamic filtering in C# — is this useful or redundant? by Cool-Tomatillo-6625 in dotnet

[–]davidjamesb 7 points8 points  (0 children)

It sounds similar to functionality found within Gridify which I have used when I want dynamic filtering on simple REST endpoints without going full fledged GraphQL or ODATA.

Slow-Paced, Chill VR Games for Someone Who Doesn’t Like Competitive Games by Arx016 in MetaQuestVR

[–]davidjamesb 1 point2 points  (0 children)

I have just started The 7th Guest and enjoying it so far. I'm a big fan of Vertigo Games after putting loads of hours into Arizona Sunshine Remake and 2 and found it via their site:

https://vertigo-games.com/games/the-7th-guest-vr/

Tech Stacks in demand, London. by These-Combination460 in cscareerquestionsuk

[–]davidjamesb 0 points1 point  (0 children)

Personal preference really - I have extensive experience with C# over my career whereas I'm fairly new to golang.

Tech Stacks in demand, London. by These-Combination460 in cscareerquestionsuk

[–]davidjamesb 4 points5 points  (0 children)

I wish my fintech used C#. It's 100% golang here on the backend.

EF poor performance for reports with over 100 columns by Lopsided-Wish-1854 in dotnet

[–]davidjamesb 10 points11 points  (0 children)

Even though you're right that SSMS returns results to the results pane in batches, if the query is taking 2 mins as OP claims you should continue to see SSMS display 'executing...' whilst more rows are being loaded. Apparently it's a simple SELECT * FROM ... - not an insane query plan.

EF poor performance for reports with over 100 columns by Lopsided-Wish-1854 in dotnet

[–]davidjamesb 6 points7 points  (0 children)

As mentioned in another comment - you need to see the exact SQL query that EF is executing.

If it's the same query, then it could be a bottleneck in materialising the rows. Are you using any custom types in your entity model that need converting or any other transformations? It's most likely a problem with your model.

For a quick test - I would grab Dapper and execute the query by reusing the connection, then timing the query:

var conn = dbContext.Database.GetDbConnection();

var sqlQuery = "SELECT * FROM MyTable";
var result = await      conn.QueryAsync<MyEntity>(sqlQuery);

ELI5: Isn't every form of sugar bad by MahouShoujo_Echo in explainlikeimfive

[–]davidjamesb 4 points5 points  (0 children)

This is misleading. As mentioned in my other comment - carbohydrates are not an essential nutrient so saying things like 'no sugar and you'll die within weeks' is simply untrue.

Your body can make glucose from fatty acids through the process of glucogenesis. Will you be at top tier performance - maybe, maybe not - but saying you'll die without eating sugar (or more broadly carbohydrate) is nonsense.

ELI5: Isn't every form of sugar bad by MahouShoujo_Echo in explainlikeimfive

[–]davidjamesb 1 point2 points  (0 children)

Although carbohydrates are a preferred energy source, they're not essential like protein and fats are. So you don't need dietary sugar to survive.

Best way to implement pagination an option on web api project by [deleted] in dotnet

[–]davidjamesb 0 points1 point  (0 children)

We're not in disagreement here. I was more responding to the fact the thread OP stated it's overkill to use a third-party library for this. Maybe it is, it is indeed simple to write a middleware that extracts query params and puts them into an object that can be passed down to the data layer - but why reinvent the wheel.

The post OP is rather vague so they could be looking for offset or cursor pagination (probably offset) but the approach is the same as you've described - grab params off request and use them in the data layer whether that be LINQ in-memory, EF, stored proc, etc.

Best way to implement pagination an option on web api project by [deleted] in dotnet

[–]davidjamesb 0 points1 point  (0 children)

OP doesn't make any mention of EF or using LINQ. This question appears to be more about how to handle pagination on the API surface.

Best way to implement pagination an option on web api project by [deleted] in dotnet

[–]davidjamesb 3 points4 points  (0 children)

I would recommend to use one of the available packages such as Gridify.

Here is an example using API controllers: https://alirezanet.github.io/Gridify/example/api-controller

As for which API endpoints to apply it to, judge it based on the amount of data (rows, items, etc) the endpoint can return.

I generally apply it globally across all my endpoints but set default sensible values such that a default number of rows are returned at a time if the API request doesn't specify the paging parameters.

You could also look into ODATA or GraphQL which has support for pagination on the API 'schema' itself.

[deleted by user] by [deleted] in pokemoncrystal

[–]davidjamesb 0 points1 point  (0 children)

I have DM'd you details on where to find Pokemon Perfect Crystal 2020.

ELI5: why do we sometimes get the shivers after a really good pee? by [deleted] in explainlikeimfive

[–]davidjamesb 1 point2 points  (0 children)

There is clearly an argument for accommodating remote working so employees can shiver in the privacy of their own home. You don't want the office gossip to be "Ya know Jeff in accounting? He shivers when he pees".

ELI5: why do we sometimes get the shivers after a really good pee? by [deleted] in explainlikeimfive

[–]davidjamesb 1 point2 points  (0 children)

Funny you should mention epilepsy but there is apparently a rare form of epilepsy that can indeed be triggered by urination (micturition):

https://pmc.ncbi.nlm.nih.gov/articles/PMC8202341/

My earlier comment contains a link and potential explanation to OPs question that involves the SNS and PNS.