public ActionResult Edit(int id) { CheckConcurrentEdit(EntryType.Tag, id); var model = new TagEditViewModel(queries.GetTagForEdit(id), PermissionContext); return(View(model)); }
private TagForEditContract Update(TagForEditContract contract) { var permissionContext = new FakePermissionContext(new UserWithPermissionsContract(Db.UserWithEditPermissions, ContentLanguagePreference.Default)); return(context.RunTest(repository => { var queries = new TagQueries(repository, permissionContext, new FakeEntryLinkFactory(), new InMemoryImagePersister(), new InMemoryImagePersister(), new FakeUserIconFactory(), new EnumTranslations()); var updated = queries.Update(contract, null); return queries.GetTagForEdit(updated.Id); })); }
public ActionResult Edit(string id) { var model = new TagEdit(queries.GetTagForEdit(id)); return(View(model)); }