Пример #1
0
        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);
        }
Пример #2
0
 public Package UpdatePackage(Package package)
 {
     return new PackageRepository().Update(package);
 }