public async Task <CollectionModel> AddCollectionAsync(AddCollectionInput model, long currentUserId) { var entity = new MovieCollection { Name = model.Name, UserId = currentUserId }; await collectionMovieRepo.AddAsync(entity); return(ConvertEntityToCollectionModel(entity)); }
public async Task <IActionResult> AddCollection([FromBody] AddCollectionInput model) { try { var result = await collectionLib.AddCollectionAsync(model, CurrentUserId); return(CustomResult(result)); } catch (System.Exception exp) { return(CustomError(exp)); } }