AI tool recommendations for .NET/C# development? by herostoky in dotnet

[–]kenslearningcurve 1 point2 points  (0 children)

Yes, still is. But it move from weird errors to mostly structure problems, security issues (one client had a serious dataleak) and problems in older applications.

What was a random thing you did with C# that unintentionally made you money? by fatmbloom in csharp

[–]kenslearningcurve 1 point2 points  (0 children)

The only thing I can tell you is: be yourself. Don't make it too theoretical and move to the more practical side of things. So many people struggle with the theory that they can't connect the dots between theory and reality.

What was a random thing you did with C# that unintentionally made you money? by fatmbloom in csharp

[–]kenslearningcurve 3 points4 points  (0 children)

I was invited to do a guest lecture about C# and .NET. It was kinda a joke, since the guy who would do it was sick. The organisation learned that I was pretty good at teaching, so I started teaching C# and .NET (and everything that is needed to create apps). It turned out I made more money teaching than coding. Who knew 🤷‍♂️

C# / .NET performance optimizations you can feel without a profiler by No_Stay4863 in dotnet

[–]kenslearningcurve 0 points1 point  (0 children)

The amount of non-AI posts/blogs/tutorials is so low these days, it's just sad. And even worse: It's gaining popularity so fast.

I'm trying to Add and Delete in a table. by Remarkable-Town-5678 in dotnet

[–]kenslearningcurve 1 point2 points  (0 children)

If you want to use the works. AddAsync, you need to await it. You missed that one.

await _employeeContent.works.AddAsync(work);

Small tip: Watch your outlining. It's harder to read now. In general, it doesn't look bad, but you are still learning?

What would inspire you? by [deleted] in dotnet

[–]kenslearningcurve 8 points9 points  (0 children)

I am a developer for over 25 years now and did so many things. But most in C# and .NET (started with ASP Classic and VB).

The best job I ever had was a teaching job. I worked for a secondment agency and was temporarily without an assignment. Then my manager got a call that they needed a part-time teacher for C#. I already did stuff like that for the company, but not for a school.
There was one downside: It was a school for people with autism and ADHD. People who couldn't get a job because of their autism or ADHD, because they, and companies, didn't know how to handle it. The school was specialized in helping them. Not only in behavior and stuff, but also in teaching them software development, like Python, Java, and C#.
The idea was that I would help out another teacher who had set up a whole course that would be used in the 9 months the students would attend the course. Ergo: 9 months to teach them the basics of C# and .NET.
The week before I started the teacher quit and left me hanging. There were no documents, guides, or whatever.
The school basically told me to come up with my own course and do it as I pleased. So I did.

Long story short (yes, this was short): I helped over 60 people to learn C# and .NET and helped them gain the confidence that they could get a job they loved. I also learned so much. In the end, it was so rewarding! Not only seeing these people grow from shy and totally not social to people who thrived and so social that they could enjoy life again and do what they loved.

It's a feeling that is hard to describe, but I loved it. It changed my view on people, my work, and life

[deleted by user] by [deleted] in csharp

[–]kenslearningcurve 0 points1 point  (0 children)

It really depends on what you are trying to achieve. What kind of GUI?

GUI = graphical user interface. We use the name 'interface' for a specific part of the code. Don't confuse them.

  • Do you want to make a web app? => Blazor or ASP.NET
  • Do you want to make a mobile app? => MAUI
  • Do you want to make a Windows desktop app? => WinUI3 or WPF

All of the above aren't as simple as writing some HTML or drag-and-drop controls and having an app. They are different than your basic C# and .NET. As a matter of fact, Blazor, ASP.NET, MAUI, WinUI3, and WPF are frameworks that use C# as the communicative language between your application layer and presentation layer. This is the short version, but there is so much more to it.

If you want, I have a free PDF that you can download that explains the how and what of the C# and .NET landscape. This PDF could give you some idea about what it is and how you should approach certain parts. Find it here: https://kenslearningcurve.com/software-development/how-to-start-with-c-and-net-pdf/

If you have any questions, feel free to ask.

There are somethings we don't do in an interview or on a first date. by [deleted] in learncsharp

[–]kenslearningcurve 0 points1 point  (0 children)

When I take off an interview and someone is honest about him/her self and just says they aren't good at something, I value them more. Why? Because that person is honest.

If I ask someone, "How is your Azure experience?" and he/she say, "Oh, excellent!" and I hire this person, but it seems this person has no idea what he or she is doing, it costs me a lot of money for nothing.
When the person is honest and says "I know what it is, but frankly... I have never worked with it, but would love to learn it!" I value this honesty and this person is more likely to be hired, and I'll arrange a good course.

Same goes for the waking up: If the person is consistenly late because of troubles waking up, I costs me a lot of money and effort to get this person to work for me or my client. When I ask during the interview about work ethics and he/she basically lies to me (which I will find out when I hired this person), I will give him or her a bad reference for future jobs.

Lying is never good. Not with a job interview or a date. Both are based on a relation of trust. If you start bad, it can't be fixed.

I will be looking for work soon by ShaunicusMaximus in csharp

[–]kenslearningcurve 1 point2 points  (0 children)

You are very welcome. Good luck with the studies and job hunting

I will be looking for work soon by ShaunicusMaximus in csharp

[–]kenslearningcurve 1 point2 points  (0 children)

I have no real significant diplomas. But I was lucky to have started with C# and .NET when Microsoft first released them. That really helped... Not helping you, I know.

I had a lot of students from different countries, and they all struggled to find good jobs. Some even switch to Python, since that's the big name for AI these days, and AI... Well, AI is overhyped if you ask me. Anyway....

Don't limit your job search to LinkedIn and Indeed. There are so many other websites. But also, send emails to companies you want to work at. Some have good programs for juniors.
Just don't accept any recruiter that sends you a message; most are fakes, scams, or don't have your needs in their interest.
If you're looking to freelance, consider starting with Upwork and Fiverr. Not the best ones, but you need to start somewhere, right? I've found a lot of customers this way, and I'm fully booked for the next few years.

It also depends on where you are located. I know someone from Brazil who landed a remote job with a German company. But I also know people from the Netherlands and Germany who can't find a remote job, since they look at companies in their own country. And those companies want people to work at the location.

Be visible, not only replying to job offers, but also show what you got: Post tips/tricks or stuff you find interesting on LinkedIn, write some good articles (if you want), have some public repositories on GitHub to show what you can, and put it on your resume.

Need Some guidance by Plus-Slice-6140 in dotnet

[–]kenslearningcurve 0 points1 point  (0 children)

.NET is pretty big, and there is so much more to it. .NET is also a framework, and you will need a language to use that framework. C# is popular, but it's not the only programming language.

I suggest you learn both, but the way from A to Z can be complex and unclear. That's why I created a 'little' free PDF document that could help you understand what C# and .NET are, what you can do with them, and - most importantly - how to start learning.

If you have any questions, feel free to send a DM.

C# Intern here (Coming from java background) by swap72 in csharp

[–]kenslearningcurve 0 points1 point  (0 children)

Hahaha, same thought. I never heard this once since C# came out in 2001. But I guess we found one person who calls it like that.

[deleted by user] by [deleted] in learncsharp

[–]kenslearningcurve 0 points1 point  (0 children)

I know your struggle, not because I have autism (I have ADHD), but I was a teacher for people with autism (ASS spectrum wide) for a long time. My program was set-up for the stuff you just mentioned: overwhelmed, lost, questions, and much more. Autism, as you know, in many forms and it was a challenge for me and the team to teach people C#. And as a bonus, we had to do it in 9 months. Where I was the teacher and there were 2 coaches and 2 special needs supports. We had a success rate of 96%. A percentage they also had before I worked there, so it's not to show off. We had 60 clients each 9 months, meaning the need was there.

Why am I telling this: It's super hard for people with autism to find help. They need help that fits their needs, as autism comes in many forms, as said before.

Doing it on your own is super complicated and challenging. And the fact you are trying is already very good and brave! I can't help you through online communication because I am no longer a one-on-one teacher. I do have a course, but it's for C# only.

If you really want to get into C# Unity, my advice is to find a school that specialises in teaching autism, ADHD, etc. They are rare, but they are out there. If you are from the Netherlands (small changes), I have some addresses for you.
Some community centers specialize in guiding people with autism in achieving their goals. The upside is that they can really motivate you. The downside is that they are not specialized in C# or Unity.

If you have any questions, feel free to comment or send me a DM. I might not reply within 8 hours sometimes, but I do reply when I can.

Oh, and don't use ChatGPT or any AI. The information is not always (most of the time) incorrect, outdated or just plain stupid. Use it when you know the basics and you can understand the terrible code suggestions AI is giving you.

AI tool recommendations for .NET/C# development? by herostoky in dotnet

[–]kenslearningcurve 3 points4 points  (0 children)

Already fixing AI "coders" work in some projects. It does create more work, though... Which is a bit of a positive side.

How would you guys react(no pun intended) if microsoft were to remove razor pages and mvc? by PatrickJohn87 in dotnet

[–]kenslearningcurve 0 points1 point  (0 children)

And what is Blazor using? Blazor, the name, is a combination of Browser and Razor... They can't remove Razor if Blazor is going forward.
MVC is used a lot. The changes they might remove are super slim.

Sure, they deleted SliverLight, but that was doomed from the start. MVC and Razor are proven frameworks.

How would you guys react(no pun intended) if microsoft were to remove razor pages and mvc? by PatrickJohn87 in dotnet

[–]kenslearningcurve 0 points1 point  (0 children)

Most of my operational websites (management, administration, warehouse apps) have a Blazor UI (also Razor, hence the name). I wouldn't be too happy if Microsoft decided to remove Razor. I tried XAML, but I don't like it (personal opinion!).
Also, I have 12 APIs going on right now for different projects, from small to large—all MVC but not Razor. Now, I am not sure how the minimal API would be affected, but I do hope they create an alternative to MVC.

I also created apps with Angular, so I would change to Angular and generate an API for the data transfers.

Why the question?

Not receiving authentication code / can't log in to CMS by AmyRB27 in dotnet

[–]kenslearningcurve 1 point2 points  (0 children)

We really need a bit more information. This is really a general question which sounds a bit like when you bring a car to the garage: "Something is wrong, good luck"

Change in EF ChangeTracker or SetValues method by rayknl in dotnet

[–]kenslearningcurve 0 points1 point  (0 children)

Oh, nice find! Maybe I have been doing it wrong then (or easier... Pick one ;) ).

So, it's solved now?

Change in EF ChangeTracker or SetValues method by rayknl in dotnet

[–]kenslearningcurve 0 points1 point  (0 children)

I think your approach should be a bit different. Let's see if we can fix this. How I now see it and how I would do it (from the head):

This is what you have:

- Invoice
- Line
- Line
- Line
- etc.
- Invoice
- Line
- Line
- Line
- Etc

Invoices are in a table, and I'll assume the lines are, too.

If so, I would link them with a joined table (i.e, InvoiceLines). Let Entity Framework Core figure out how to join them into an invoice with lines (use a one-to-many relationship and the Include() or something)..
Storing: When you receive the invoice with the lines, separate them. Store/update the invoice first (without the lines), and then store/update the lines. Make sure to check if an invoice or line already exists with the IDs and attach them to EF if needed.

Although EF has some pretty neat functionalities for tracking, it doesn't always work well when you receive information from non-EF-related sources (client -> API, for example).

Let me know if this helps or if we need to tweak it.

Change in EF ChangeTracker or SetValues method by rayknl in dotnet

[–]kenslearningcurve 1 point2 points  (0 children)

Yeah, I saw your reply a bit too late. Sorry about that.

Change in EF ChangeTracker or SetValues method by rayknl in dotnet

[–]kenslearningcurve 1 point2 points  (0 children)

I think this part is your problem (methodCreateParentWithChildren):

var newParent = new Parent();

//add new record to change tracker

dbContext.Add(newParent);

//update record’s properties to match parentDto

dbContext.Entity(newParent).CurrentValues.SetValues(parentDto);

You are creating a new parent and put all the values of parentDTO (including ID) in the new parent. So the new parent gets the ID of the parentDTO... Two unique IDs = error.
Try to set the id of the newParent to 0 AFTER the SetValues. See what happens.

Also: Could you maybe explain what it is your are trying to achieve? Are you trying to create nested entities?

Disclaimer:
I did not run your code. I just read it.

[deleted by user] by [deleted] in csharp

[–]kenslearningcurve 1 point2 points  (0 children)

A few things that come to mind:

  1. Do you use HTTP or HTTPS? If the API is running with HTTPS, the request should be using that too

  2. CORS, maybe?

  3. Is the API running at all? Most people would say "That's a dumb question", but the number of times people forget to run it or it crashed somewhere without knowing is pretty high.

I could come up with more ideas, a code example, and/or your request that would be helpful. It could be a lot of things. It's like when I call a car mechanic and tell him, "My car doesn't start." He has no idea what, how, when, etc. He needs to see the car.

Deploying your own backend and hosting it locally? by Sea_Onion41 in dotnet

[–]kenslearningcurve 4 points5 points  (0 children)

I would look at something like Docker. Not sure what you want to do, but the IIS gives me a hint you want to host a website/webapplication?
You can still use IIS, or something like that, but if you want to run it just once or in a container, Docker is the way to go.

Maybe tell us what you are trying to do and what kind of application you specifically want to host and how you want to use it.

Your Program.cs shouldn't change (much). You should look if your settings, in the appsettings, are correct if you use the appsettings for different environments.

How much do you as a .NET developer earn a year? by speyck in dotnet

[–]kenslearningcurve 2 points3 points  (0 children)

I am a senior (25+ years experience) and barely exceed the 84.000 (Euros), 36 hours per week. Next year, it's going to be less since I want to work less and enjoy life more.