public ActionResult Add() { var model = new AddToCollectionInputModel() { Collections = this.Data.Collections.All() .Project() .To <CollectionViewModel>() }; return(PartialView("_Add", model)); }
public async Task <ActionResult <AddToCollectionResourceModel> > Add(AddToCollectionInputModel inputModel) { try { var resourceModel = await this.collectionsService.AddToCollection <AddToCollectionResourceModel>( inputModel.VinylGrade, inputModel.SleeveGrade, inputModel.Description, inputModel.ReleaseId, this.GetUserId(this.User)); return(this.Created(resourceModel)); } catch (Exception ex) { this.loggerService.LogException(ex); return(this.BadRequest()); } }