jalepi
How to iterate all classes in a name space ?
Microsoft Visual C# Step by Step, 10th Edition, or newer.
Read the book, doing the exercises for each chapter. Proceed to the next chapter once you understood the previous one. Don't skip. One by one, like a good student 😉
15 replies
❔ How explicitly define command and handlers for MediatR
the different project should expose a public method for adding dependencies to service collection.
in the other project, which doesn't know about mediator, you add the dependencies.
now the question is how would you send commands to mediator, not knowing MediatR types.
you library which knows about MediatR should also expose interface and a concrete type as dependency, to act as a proxy - because you don't want to inject IMediator I assume
21 replies
❔ Entity Framework duplicating primary key with seeded data.
It's necessary that both your table AND your data model entity are configured properly.
Database, it is specific, you should check their docs.
EF is pretty straight forward as well, using model creation with fluent API, or attributes. Also, check their docs.
9 replies
❔ What is better book for c# mastery? "Pro C# 9 with .NET 5" or "C# 9 and .NET 5"?
Microsoft Visual C# Step by Step, by John Sharp and Microsoft Press.
https://www.microsoftpressstore.com/store/microsoft-visual-c-sharp-step-by-step-9780137619832
7 replies