Are there different callbacks available in aps.net like rails provide before_validation, before_update, before_save and before_destroy ?
How to handle this scenarios in aps.net ?
Are there different callbacks available in aps.net like rails provide before_validation, before_update, before_save and before_destroy ?
How to handle this scenarios in aps.net ?
Take a look at the concept of Filters in ASP.NET MVC and also to the following 4 methods in the controller base class: OnActionExecuting, OnResultExecuting, OnAuthorization, and OnException.
http://msdn.microsoft.com/en-us/library/system.web.mvc.controller.onactionexecuting.aspx-
Update On a second though I just realize that you might be looking for methods at the Model level and I answered from the Controller level. Unfortunately from what I understand that ASP.NET MVC does not provide as much at the Model level as Ruby On Rails does.