public void Create(BllUser entity) { entity.Password = Crypto.HashPassword(entity.Password); userRepo.Create(entity.ToDal()); uow.Save(); }
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(); }