Adam Schroder

Its Schotime.com!

February 2009 - Posts

Custom Authorization With Asp.net MVC

The whole advantage with MVC over webforms is extensibility at every point. Extensibility, Extensibility, Extensibility.

Authorization is a very important and every web project has there own needs and requirements. Full customisation is paramount.

Here I will show you a simple way to customise your authorization.

In MVC attributes are used to protect a controller method, so we to get started all we need to do is inherit from the AuthorizeAttribute class.

Click here to see the solution

Happy Coding

Adam

Posted: Feb 17 2009, 09:27 PM by schotime | with no comments
Filed under: , ,
Retrieving Data Without the Dataset With Custom SQL

In my previous post I used custom sql query and transformed the results into a nested class. However you may have overlooked way I got the data into a class. It quite easy and will work with all database connectors that implement IDbConnection.

Here is how its done. We use the DataContext that came with and used by Linq2Sql.

Click here to see the solution.

Adam

Posted: Feb 12 2009, 08:47 PM by schotime | with no comments
Filed under: , ,
More Posts