Posts tagged "mongodb"

Powershell scripts for MSSQL or MongoDB backup to Azure & AWS

In this post, I’d like to present the two simple Powershell scripts, that will let you create a secured (password protected zip archive) backup of the MSSQL or MongoDB databases and upload it either to the Azure or AWS cloud. By using such solution, you may actually save a few bucks instead of using some external, paid services like e.g. CherrySafe that do the same thing.

Continue reading

Pagination for MSSQL & MongoDB

Pagination is (should be) a well-known concept for most of the developers. Whether we want to execute an optimized query on a database that will fetch just a small subset of all available records or increase the web service throughput by returning less data than it’s needed – it all boils down to the efficient usage of the pagination.
I’m going to present my approach to this mechanism, both for the MSSQL and MongoDB databases, yet it can be also used in any other scenario such as in memory pagination.

Continue reading

Extension methods to the rescue (from repository)

In one of my previous posts (which you can read here), I’ve told about my feelings for the repository pattern. Complaining about something is one thing (please, don’t even try to tell me, that you have never seen some piece of code, that made you cry like a baby), however, if we want to (pretend to) be professionalists, it is very important to come up with some ideas in order to solve the given problem (at least partially). In this post, I’ll present to you one of my solutions to the commonly misused repository pattern (especially on the querying side).

Continue reading