Rails Console is so useful for direct sanity-checking of your model. Is there an ASP.NET MVC equivalent?
Is it possible to mimic Rails Console behaviour using LinqPA
awesome - I discovered LinqPAD 4.38.03 (latest beta version) works perfectly well as a Rails Console substitute!
My ASP.NET MVC3 project is based on Entity Framework 4.2 (using the "database first" approach) which Linqpad integrates nicely with. I am able to reference my assembly as a connection and query the model, controller, repositories etc. interactively, just like in Rails Console!
These were my steps
Finally, in your query window select your new assembly connection as the "Database" and that's it! You can now work with your assembly interactively.
For example, to inspect and test a controller: (first, in Query Properties, add a reference to System.Web.Mvc)
var controller = MyProject.Controllers.CustomerController();
controller.Index().Dump();
to "post" some data
var customer = new Customer() {name = "Brian"};
controller.Create(customer);
to see your new Customer in the database
Customers.Dump();
or if you have a repository
var repo = new Repository();
repo.GetCustomers().Dump();