public async Task <PackageDto> UpdatePackage(int clientId, int lineId, PackageDto package) { Task <PackageDto> packageToUpdate; lock (_obj) { packageToUpdate = _packageProvider.UpdatePackage(package.PackageId, package); } return(await packageToUpdate); }