Platform for creating data-oriented web apps
That coding style looks more like the WebMatrix Web Pages pattern rather than ASP.Net MVC. If this coding style is desired then it would be preferable to go ahead and use the data access library that is usually used with Web Pages, the WebMatrix.Data library. That will by default guard against SQL Injection as long as the convention of the parameterized queries is used, e.g. 

    selectCommand = "SELECT URL, Name FROM Pages WHERE ID = @0 AND Date = @1";
    selectedData = db.Query(selectCommand, Request.QueryString["Id"], Request.QueryString["Date"]);


This should be OK for simple sites, but for larger or more complex sites you would be better to separate the data access from the presentation layer, using the full MVC pattern.  The downside of the pattern shown here is that is difficult to test or debug compared to MVC or WebForms and it tends to introduce duplication in the code.