public bool Create(string email, string password, string name, DateTime birth) { logger.Info("BLL: Process of creating user started"); try { UserData user = new UserData(name, birth); int idUser = daoUsers.Create(email, user); if (idUser >= 0) { string pswd = ComputeSHA256Hash($"{password}{idUser}"); daoUsers.SetPassword(idUser, pswd); logger.Info("BLL: Process of creating user done"); return(true); } logger.Info("BLL: Process of creating user was unsucssesseful"); return(false); } catch (StorageException e) { logger.Error("BLL: Process of creating user failed!"); throw new Exception("error while creating user", e); } catch (Exception e) { logger.Error("BLL: Process of creating user failed!"); throw new Exception("error while creating user", e); } }
public BasicECommerce.Entity.Models.Users Create(BasicECommerce.Entity.Models.Users G_entity) { return(_userDal.Create(G_entity)); }