Пример #1
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 InsertIntoUserDatabase(User user)
 {
     ConnectToDatabase();
     db.Users.InsertOnSubmit(user);
     db.SubmitChanges();
 }