public async Task <Result <Unit, Contracts.Error> > DeleteAsync(string galleryName, IEnumerable <string> ids) { var result = await Name.FromString(galleryName) .AndThenAsync(name => ToIds(ids) .AndThenAsync(i => _uploadService.Delete(name, i))); return(result.MapFailure(ErrorExtensions.ToContract)); }