public IResult Update(IFormFile videoFile, IFormFile thumbnailFile, Video video) { var result = BusinessRule.Run ( CheckIfVideoExist(video.Id) ); if (result != null) { return(result); } var videoToUpdate = _videoDal.Get(v => v.Id == video.Id); video.VideoPath = _fileSystem.Update(videoFile, videoToUpdate.VideoPath, _videoPath); video.ThumbnailPath = _fileSystem.Update(thumbnailFile, videoToUpdate.ThumbnailPath, _thumbnailPath); video.Date = videoToUpdate.Date; videoToUpdate.UpdateDate = DateTime.Now; _videoDal.Update(video); return(new SuccessResult()); }
public void Update(Video video) { _videoDal.Update(video); }