nerddinner

NerdDinner form validation DataAnnotations ERROR in MVC2 when a form field is left blank.

Platform: Windows 7 Ultimate IDE: Visual Studio 2010 Ultimate Web Environment: ASP.NET MVC 2 Database: SQL Server 2008 R2 Express Data Access: Entity Framework 4 Form Validation: DataAnnotations Sample App: NerdDinner from Wrox Pro ASP.NET MVC 2 Book: Wrox Professional MVC 2 Problem with Chapter 1 - Section: "Integrating Validation and B...

ViewResult returns no data

Hi! I am using the pattern from NerdDinner. I call Index() in my test Method and I the ViewREsult I get back has no data. So the variable data ends up being null. However, I know that there is data there. Because I can go to the watch window and expand the variable result and expand viewData->Model->ResultsView then I see the "expandi...

MVC, ascx and Javascript best practice(s) - how to create self-containing controls? NerdDinner does it wrong.

Hi, The question is how to create controls/partial views/edittemplates (ascx files) in ASP.Net MVC2 so that they are "self-containing". Self-containing means here that if some Javascript code should be applied on the control, that's not included in the page (aspx), but in the control itself. Specific example: NerdDinner's DateTime.ascx....

Nerd Dinner - how is the return type of the EF queries determined?

In Nerd Dinner's Entity Framework repository, the queries' return type corresponds to the model and not to the EF conceptual entity. public IQueryable<Dinner> FindAllDinners() { return db.Dinners; } ... public ObjectSet<Dinner> Dinners // NerdDinner.Designer.cs, line 76 The type of Dinner is NerdDinner.Models.Dinner. I noticed ...

Problem in GetRuleViolations method in NerdDinner tutotial

Hi All. I'm on about page 70 of the NerdDinner tutorial (MVC 1.0 version). It won't build at this point because it is saying the properties referred to in the GetRuleViolations (ie, Title, Description, etc) can't be resolved. I've compared my own project with the downloadable source code and can't figure out what is missing. The error VS...

Cannot open database "Database" requested by the login

Hey guys, I'm working through a sample .Net MVC application. I've added the aspnet membership api tables to an existing database. I've modified the web.config file as follows: <connectionStrings> <add name="ApplicationServices" connectionString="Data Source=localhost;Initial Catalog=nerddinner;Integrated Security=True;User Instanc...