public Package AddPackage(Package package) { PackageRepository rep=new PackageRepository(); Package p=rep.GetPackage(package.Fingerprint); if (p != null) return p; package.CreateTime = DateTime.Now; package.Enable = true; return new PackageRepository().Add(package); }
public Package UpdatePackage(Package package) { return new PackageRepository().Update(package); }