Ejemplo n.º 1
0
        public User GetUser()
        {
            string connectionString = @"Data Source=LAPTOP-6HUM6MNH;Initial Catalog=cryptocurrency;User ID=admin;Password=admin";
            LinqToSQLDataContext db = new LinqToSQLDataContext(connectionString);

            return(null);
        }
Ejemplo n.º 2
0
        public void LinqConnect(User user)
        {
            string connectionString = @"Data Source=LAPTOP-6HUM6MNH;Initial Catalog=cryptocurrency;User ID=admin;Password=admin";
            LinqToSQLDataContext db = new LinqToSQLDataContext(connectionString);

            db.Users.InsertOnSubmit(user);
            db.SubmitChanges();
        }
        public void ConnectToDatabase()
        {
            string connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["CryptoCurrencyConnectionString"].ToString();

            db = new LinqToSQLDataContext(connectionString);
        }