DEV Community

Discussion on: Implementing a Generic Dapper Repository in ASP.NET Core

Collapse
 
buinauskas profile image
Evaldas Buinauskas

No disrespect, but this seems quite redundant to me.

Wouldn't it be better to have a global error(exception) logging in application in case as this? Catching any kind of exception, logging and returning a default value looks like a code smell to me. I always follow the rule that it's better to catch only those exceptions you would expect.

ASP.NET Core implements global exception lagging out of the box.