public async Task <ApiResponse> CreateLibrary([FromBody] LibraryRequest request) { var apiResp = new ApiResponse { ResponseType = -1, ResponseMessage = "Failed" }; request.CreatedBy = 1; request.LibraryCoverFilePath = "http://www.apigagasimedia.co.za/JukeBoxStore/Album/" + request.LibraryCoverFilePath; var retVal = await(new JukeBox.BLL.Library()).CreateLibrary(request.LibraryID, request.FK_ClientID, request.FK_LibraryTypeID, request.LibraryName, request.LibraryDescription, request.LibraryCoverFilePath, request.Price, request.CreatedBy);; if (retVal.Success.HasValue) { apiResp.ResponseType = Convert.ToInt16(retVal.Success); apiResp.ResponseMessage = retVal.Message; } return(apiResp); }
public LibraryRequestViewModel(LibraryRequest request) { this.request = request; }