public ActionResult Create(BlobSetViewModel model) { if (!this.ModelState.IsValid) { return this.View(model); } var blobSet = new BlobSet { Name = model.Name, Description = model.Description }; this.blobSetService.CreateBlobSet(blobSet); if (model.AddPermissions) { return RedirectToAction("Permissions", new { id = blobSet.BlobSetId }); } else { return RedirectToAction("Details", new { id = blobSet.BlobSetId }); } }
public ActionResult Edit(Guid id, BlobSetViewModel model) { if (!this.ModelState.IsValid) { return View(model); } var blob = this.blobSetService.GetBlobSetById(id); blob.Name = model.Name; blob.Description = model.Description; this.blobSetService.UpdateBlobSet(blob); return RedirectToAction("Details", new { id = id }); }