public TemplePackageEditViewModel Update(TemplePackageEditViewModel TemplePackage)
        {
            TemplePackage _TemplePackage = TemplePackageRepo.Update(TemplePackage.toModel());

            unitOfWork.commit();
            return(_TemplePackage.toEditViewModel());
        }
Ejemplo n.º 2
0
 public static TemplePackageEditViewModel toEditViewModel(this TemplePackage model)
 {
     return(new TemplePackageEditViewModel()
     {
         ID = model.ID,
         DayNumber = model.DayNumber
     });
 }
 public static TemplePackageViewModel toViewModel(this TemplePackage model)
 {
     return(new TemplePackageViewModel()
     {
         ID = model.ID,
         DayNumber = model.DayNumber,
         TempleID = model.TempleID,
         PackageID = model.PackageID
     });
 }
        public TemplePackageViewModel GetByID(int id)
        {
            TemplePackage TemplePackage = TemplePackageRepo.GetByID(id);

            return(TemplePackage.toViewModel());
        }