public IHttpActionResult Post(AlbumsBindingModel albumRequestModel) { if (!this.ModelState.IsValid) { return(this.BadRequest(this.ModelState)); } var currentUser = this.User.Identity.Name; var newAlbum = Mapper.Map <Album>(albumRequestModel); var createdProjectId = this.albumsService .Add(newAlbum, currentUser); return(this.Ok(createdProjectId)); }
public IHttpActionResult Post(AlbumsBindingModel albumRequestModel) { if (!this.ModelState.IsValid) { return this.BadRequest(this.ModelState); } var currentUser = this.User.Identity.Name; var newAlbum = Mapper.Map<Album>(albumRequestModel); var createdProjectId = this.albumsService .Add(newAlbum, currentUser); return this.Ok(createdProjectId); }