4:45 Best practice/Performance tip: return a boolean or an Error object instead of throwing an exception. For methods that return valid values, such as GetByIdAsync, you can use OneOf or ErrorOr libraries to return an explicit "not found" instead of using null as an implicit case.
All good stuff. Only suggestion is speech cadence is inconsistent. Try maintaining the same speed, slower than normal, throughout. Also, explain the “why”. Thanks for the video. Keep up the good work!
Really good video, learnt some things I didn't know here (I'm not a dev), but now thinking of how I can apply this to my own projects. 😃
Thanks for the video but I actually don't want to find myself writing sql queries on the code side. Sometimes I can add a new feature to a class and then I need to change or update the sql query that I defined as dapper query in my repository. btw I know the dapper's power.
Great video, wish you a Happy Hanukkah! סיון רהב-מאיר
Can we use the generic repository pattern like in EF core or do we have to write distinct queries for every entity?
why scoped for IDBConnectionFactory class?
Hi, Amichai. Thanks for the video. Can you say please is it would be a good idea to change our insert and select queries using string interpolation for naming columns using nameof(Product.Name) for example instead of hardcoding column titles in query string?
Can someone give an example where the fields are not only strings?
Cool! Shouldn't we reuse the opened DB connection tho?
I haven’t used Dapper in 15 years, it’s barely changed, it certainly isn’t a EF CORE killer, but is worth knowing for the few scenarios it does a better job than EF CORE
I have been seeing singular names for repositories out there, like "ProductRepository" instead of "ProductsRepository". Which makes more sense?
Great video as always. One question I have is why did we go with Dapper instead of EF?
Thanks very much Amichai for this video. I'd like you make video how is your vscode settings, add-ons, settings, tips e etc. I notice that your vscode look like vim editor. Again, thank you.
Thanks for the video. In the work environment, do you use postgre SQL or MSSQL? I ask it because in macOS you cannot use the MSSQL. I wonder how do you handle it?
CancellationTokens are missing. Dapper lines should change a little bit to use CommandDefinition that takes cancellation tokens.
What vscode theme are you using?
I think you should be AddSingleton instead AddScoped, correct me if I'm wrong
Why the heck are you using primary constructors and assigning a private field variable? Just use the parameter directly. Thats the point of it
@fanaccount6600