I am trying to build a blog webapi with this web api core demo and microsoft doc. I use Npgsql connect to a PostgreSQL database, and add some methods, but the database return error message "too many clients connected" when I debugging.
So how to close the connections in webapi? I read some documents but can't find a way to do with it.