Continuing to refactor ModelDriver concept into ContentHandler

--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4041354
This commit is contained in:
loudej
2009-11-19 05:40:38 +00:00
parent 40632265f7
commit 957a4b0127
33 changed files with 105 additions and 109 deletions

View File

@@ -38,7 +38,7 @@ namespace Orchard.Users.Controllers {
var model = new UsersIndexViewModel();
model.Rows = _userRepository.Fetch(x => x.UserName != null)
.Select(x => new UsersIndexViewModel.Row {
User = _contentManager.Get(x.Id).As<UserModel>()
User = _contentManager.Get(x.Id).As<User>()
})
.ToList();
@@ -67,14 +67,14 @@ namespace Orchard.Users.Controllers {
}
public ActionResult Edit(int id) {
var model = new UserEditViewModel { User = _contentManager.Get<UserModel>(id) };
var model = new UserEditViewModel { User = _contentManager.Get<User>(id) };
model.Editors = _contentManager.GetEditors(model.User.ContentItem);
return View(model);
}
[HttpPost]
public ActionResult Edit(int id, FormCollection input) {
var model = new UserEditViewModel { User = _contentManager.Get<UserModel>(id) };
var model = new UserEditViewModel { User = _contentManager.Get<User>(id) };
model.Editors = _contentManager.UpdateEditors(model.User.ContentItem, this);
if (!TryUpdateModel(model, input.ToValueProvider())) {