Esempio n. 1
0
        public void Update(BllUser entity)
        {
            BllUser user = Find(entity.Id);

            if (entity is BllProgrammer)
            {
                UpdateUserSkills((BllProgrammer)entity);
            }
            else if (entity is BllManager)
            {
                UpdateFilters((BllManager)entity);
            }

            if (entity.Password != user.Password)
            {
                entity.Password = Crypto.HashPassword(entity.Password);
            }

            userRepo.Update(entity.ToDal());
            uow.Save();
        }
Esempio n. 2
0
 public void Create(BllUser entity)
 {
     entity.Password = Crypto.HashPassword(entity.Password);
     userRepo.Create(entity.ToDal());
     uow.Save();
 }
Esempio n. 3
0
 public void Delete(BllUser entity)
 {
     repository.Delete(entity.ToDal());
     unitOfWork.Commit();
 }