public bool CheckPassword(Account cuenta, string loginPassword) { if (cuenta.Password != loginPassword) { return false; } return true; }
public void AddActivity(string actividad, Account cuenta) { var account = _readOnlyRepository.First<Account>(x => x.EMail == cuenta.EMail); var act = new Actividades(); act.Actividad = actividad; act.hora = DateTime.Now; account.History.Add(act); _writeOnlyRepository.Update(account); }
public ActionResult AccountSignUp(AccountSignUpModel model) { var result = _readOnlyRepository.Query<Account>(a=>a.EMail==model.EMail); if (result.Any()) { Error("Email account is already registered in this site!!!"); return View(model); } var accountModel = Mapper.Map<AccountSignUpModel>(model); var account = new Account { Name = accountModel.Name, LastName = accountModel.LastName, EMail = accountModel.EMail, IsArchived = false, Password = EncriptacionMD5.Encriptar(accountModel.Password) }; _writeOnlyRepository.Create(account); return Cancelar(); }