I can think of a perfect Don't do it
example.
Lets say we have a ProductController:
public class ProductController()
{
public ViewResult Discontinued()
{
var db = new ProductsDb();
var products = db.Products.Where(x => x.Discontinued).ToList();
return new ViewResult(products);
}
}
With razor we have an alternative
public class ProductController()
{
public ViewResult Discontinued()
{
var db = new ProductsDb();
var products = db.Products.ToList();
return new ViewResult(products);
}
}
and in our view:
@model IEnumerable<Product>
@foreach (var item in Model.Where(x => x.Discontinued)) {
....
}
I think it is pretty obvious that the second solution just feels so wrong. If you do something like this, don't blame razor - blame yourself.
And don't forget: Being able to use C# in views is not a razor feature, it was possible with ASP.NET views, too. With razor it's just a little bit simpler.
If you are searching for a template engine which is more rails like you should take a look at nancy.fx with the Super simple view engine.