public ActionResult Add(string application) { PackageAddModel model = new PackageAddModel(); model.Application = application; return(this.View("Add", model)); }
public ActionResult AddSubmit(PackageAddModel model) { if(model.File != null && model.File.ContentLength > 0) { Logger.Info(this, "Received package upload " + model.File.FileName); Core.Package package = BytePackage.Create(model.File.InputStream.ReadAllBytes(), model.File.FileName); Persistence.Application fileSystemApplication = this._repository.GetApplication(model.Application); this._repository.CreatePackage(fileSystemApplication, package); } return this.RedirectToAction("List", new { application = model.Application }); }
public ActionResult AddSubmit(PackageAddModel model) { if (model.File != null && model.File.ContentLength > 0) { Logger.Info(this, "Received package upload " + model.File.FileName); Core.Package package = BytePackage.Create(model.File.InputStream.ReadAllBytes(), model.File.FileName); Persistence.Application fileSystemApplication = this._repository.GetApplication(model.Application); this._repository.CreatePackage(fileSystemApplication, package); } return(this.RedirectToAction("List", new { application = model.Application })); }
public ActionResult Add(string application) { PackageAddModel model = new PackageAddModel(); model.Application = application; return this.View("Add", model); }