nerddinner

ASP.NET MVC 2 UpdateModel() is not updating values in memory or database

a 夏天 提交于 2019-12-06 04:37:58
I am new to MVC, and so am working through the NerdDinner tutorial, here . In particular, I'm running into problems with the use of the UpdateModel method, which is explained in the part five of that tutorial. The problem is, when I try to edit the value of a dinner object using the UpdateModel method, the values do not get updated, and no exceptions are thrown. Oddly, I am not having any trouble with the Create or Delete features that are illustrated in the tutorial. Only the update feature isn't working. Below, I have included the Controller code that I am using, as well as the view markup,

ASP.NET MVC: How many repositories?

别等时光非礼了梦想. 提交于 2019-12-04 03:02:54
I am in the process is designing a website in ASP.NET MVC and am perhaps a little confused as to the exact nature of a repository. Following the NerdDinner example, my site should have one repository which serves up the entities as I need them. However, I have also heard that you should have different repositorys that deal with specific sets of related entities....? In the case of my site, there will be a number of entities (around 15 tables) yet the majority are all related. Is it ok / advisable to have one repository that contains all the methods that I'll need for pulling / updating /

Request for Tutorial to add Openid Support to NerdDinner ASP.NET MVC application

泪湿孤枕 提交于 2019-11-28 15:36:03
I'm looking learn about ASP.NET MVC and OpenId using the ASP.NET MVC NerdDinner tutorial. I would like to replace the Authentication system in NerdDinner to be OpenId only. I've downloaded the latest DotNetOpenAuth libraries but I'm not sure how to put it all together. Can anyone help with a quick step-by-step tutorial? Is this as simple as dropping in the library or are there significant changes needed to the application as well? Once you download dotnetopenid , look in the samples\RelyingPartyMvc directory. There is a sample where they replace the default MVC authentication system with

Request for Tutorial to add Openid Support to NerdDinner ASP.NET MVC application

时光怂恿深爱的人放手 提交于 2019-11-27 09:18:09
问题 I'm looking learn about ASP.NET MVC and OpenId using the ASP.NET MVC NerdDinner tutorial. I would like to replace the Authentication system in NerdDinner to be OpenId only. I've downloaded the latest DotNetOpenAuth libraries but I'm not sure how to put it all together. Can anyone help with a quick step-by-step tutorial? Is this as simple as dropping in the library or are there significant changes needed to the application as well? 回答1: Once you download dotnetopenid, look in the samples

What is ModelState.IsValid valid for in ASP.NET MVC in NerdDinner?

只愿长相守 提交于 2019-11-26 07:38:00
On the NerdDinner example of Professional ASP.NET MVC 1.0 there's a method to create a new dinner as copied bellow (page 89 of the free NerdDinner version). There it checks ModelState.IsValid for true. It seems to check if the model is valid for the database (that is, it catches data type conversions, like dates with invalid format, but not business rules). Is that true? When submitting the form, if you have an error in the date, ModelState.IsValid will be false and you'll get back an error, but only for the date because AddRuleViolations was never executed. If you remove the check for