Esempio n. 1
0
        public async Task <PackageAddResult> AddAsync(Package package)
        {
            if (!(await _context.IsPackageAlreadyExists(package.Id, package.Version)))
            {
                await _context.AddPackage(package);

                return(PackageAddResult.Success);
            }
            return(PackageAddResult.PackageAlreadyExists);
        }