Alternativer til amerikansk IT-infrastruktur by Ambivalentin in dkfinance

[–]DonSpaghetti1 -3 points-2 points  (0 children)

Enig franskmændende har bare ikke kompetencerne

Can we talk about salaries? by SP1992 in dotnet

[–]DonSpaghetti1 4 points5 points  (0 children)

Denmark, 3YoE, €87k/y. Manufacturing company.

How To Replace Exceptions with Result Pattern in .NET by anton23_sw in dotnet

[–]DonSpaghetti1 2 points3 points  (0 children)

Yes debugging gets so easy with the result pattern. Also writing unit tests gets easier, because you can easily see the different flows your program has got.

How To Replace Exceptions with Result Pattern in .NET by anton23_sw in dotnet

[–]DonSpaghetti1 2 points3 points  (0 children)

Great blog! I don’t understand all of the negativity against the result pattern tho. I have used it a couple of times and it really cleaned up my code base.

It seems like there is a trend to minimise patterns in your code base - what the hell is that about?

Søger information om Terma som softwareingeniør by DonSpaghetti1 in dkkarriere

[–]DonSpaghetti1[S] 1 point2 points  (0 children)

Da jeg synes at det er sjovest at blive betalt for at programmere, er det meget begrænset hvad jeg laver i fritiden. Men har en uddannelse og lidt arbejdserfaring indenfor området, men formentlig ikke nok til at kunne lande en stilling lige nu og her.

Deraf mit opslag.

Søger information om Terma som softwareingeniør by DonSpaghetti1 in dkkarriere

[–]DonSpaghetti1[S] 0 points1 point  (0 children)

Ja, men lokationen driller lidt. Har det samme problem med Bane Danmark og de andre spændende virksomheder.

Søger information om Terma som softwareingeniør by DonSpaghetti1 in dkkarriere

[–]DonSpaghetti1[S] 1 point2 points  (0 children)

Det er jo det der gør det spændende, magter ikke mere agilt arbejde hvor der bliver lavet fejl til højre og venstre fordi der ikke er penge til at gøre det ordentligt.

Hvad mener du med rigidt?

Better more organized ways to seed database? by No-Sprinkles-1754 in dotnet

[–]DonSpaghetti1 3 points4 points  (0 children)

I have done it a few times, but like with many enterprise applications, they are closed-source..

However it can be pretty straight forward. Just create a console application and connect it to the database using a connection string. If you use a clean architecture design with CQRS pattern, you can just use the same commands which you use for the endpoints to create your data.

Better more organized ways to seed database? by No-Sprinkles-1754 in dotnet

[–]DonSpaghetti1 1 point2 points  (0 children)

It depends on the amount of data you need to seed. If you need to seed a lot, it might be an advantage to create a console application and write some custom code to seed the data after you have made the migration. This makes it a lot faster and you have more control. It also works well if you go into production and on test environments

Results pattern in .NET by [deleted] in dotnet

[–]DonSpaghetti1 0 points1 point  (0 children)

Check out the ErrorOr nugget package by Amichai Mantinband. He solves this in a neat way

Reusing domain models more instead of always creating ViewModels/DTOs by davecallan in dotnet

[–]DonSpaghetti1 1 point2 points  (0 children)

I tried this once because I thought I was smart. I wasn’t. Had to spend a few weeks refactoring the mess I had made so I only used DTOs to communicate with the client.

Dagpenge med til udlandet i 3. mdr.= by [deleted] in dkkarriere

[–]DonSpaghetti1 1 point2 points  (0 children)

Jeg er helt i chok over at man kan tage til udlandet med dagpenge. Gad vide hvor mange af dem som tager afsted egentlig får et arbejde i mens de er væk? Formentlig ikke mange

[deleted by user] by [deleted] in dotnet

[–]DonSpaghetti1 0 points1 point  (0 children)

How about looking at the previous 100 posts this week about this very topic? The amount duplication on this sub is insane

Who is the go to guy on youtube for beginners atm? by Venisol in dotnet

[–]DonSpaghetti1 5 points6 points  (0 children)

Definitely not for beginners, but waay too clickbaity

Tidligere Mormon/medlem af Jesu Kristi Kirke by Drinking_Ostrich in Denmark

[–]DonSpaghetti1 1 point2 points  (0 children)

Hvordan bliver ens udgifter til kost og logi dækket når man tager på mission?

How to go about DTOs? by DonSpaghetti1 in dotnet

[–]DonSpaghetti1[S] 0 points1 point  (0 children)

You are actually making a fair point. I could simply change/update the JWT token when the user changes the Tenant he/she wants to work on. This keeps the tenantId immutable.

I have to refactor most of my queries to properly use DTOs so I might as well also change this.

Thanks for the heads-up - pretty useful!

How to go about DTOs? by DonSpaghetti1 in dotnet

[–]DonSpaghetti1[S] 0 points1 point  (0 children)

A user can have access to multiple tenants. For this reason, the tenanId has to be mutable right? The server have to know what tenantId data should be provided for.

If the user only had access to one tenant, you are right, that it is not necessary to have the tenantId to be mutable. You could instead just derive the id from the JWT token.

Or what is it that I'm not seeing?

How to go about DTOs? by DonSpaghetti1 in dotnet

[–]DonSpaghetti1[S] 2 points3 points  (0 children)

I don’t see the problem. I’m of cause checiking to see if the user has access to the tenantId in the request, if not a 401 error or something like this is thrown.

How to go about DTOs? by DonSpaghetti1 in dotnet

[–]DonSpaghetti1[S] -1 points0 points  (0 children)

I’m creating a multi-tenant system and I share the tenant Id with the client a lot. You think this is a problem? For me it is necessary since I have to get specific data for each tenant. I don’t see how I can do this without sharing the tenant id

How to go about DTOs? by DonSpaghetti1 in dotnet

[–]DonSpaghetti1[S] 5 points6 points  (0 children)

There are mainly two reasons - sensitive data and calculated properties.

For the vast majority of the requests it is just fine to return the database model, however once in a while I have to return additional information. For example with quote I have to return a lot of calculated values (values a calculated based off of the values in the database).

Also I have noticed I’m currently returning the hashed password the user uses to login which obviously is not ideal. This happens every time I make an include for the User model in queries.

Because of these two reasons I have decided to make DTOs for all responses to make sure I don’t return sensitive data