public Card GetCard() { return(new Card { Id = Ibentificator <Card> .GetId(), Bank = GetBankName(), CVC = GetCvc(), Duration = GetDurationType(), ExpiredDate = GetExprideDate(), CardType = GetCardType(), CardNumber = GetCardNumber(), CardHolder = $"{_user.name} {_user.Surname}", CardHolderId = _user.Id }); }
private void Button2_Click(object sender, EventArgs e) { string email = textBox1.Text, password = textBox2.Text; if (dbContext.Users.FindItem(u => u.Email == email) == null) { User user = new User { Id = Ibentificator <User> .GetId(), Email = email, Password = password, userType = UserType.User }; dbContext.Users.Add(user); MessageBox.Show("You successfully registered!"); } else { MessageBox.Show("this user already exists!"); } }