//TODO: return Task<IAsset> public IAsset Insert(string filePath) { var fileName = Path.GetFileName(filePath); //Create the asset var asset = mediaContext.Assets.Create(fileName, AssetCreationOptions.None); var file = asset.AssetFiles.Create(fileName); file.Upload(filePath); mediaFacade.Process(asset); return(asset); }