I have not programmed anything with my full attention for some time. I have been looking at job postings for C# since that is my language of choice as most of you know. Alot of them prefer some sort of SQL experience and I have zero knowledge in sql. So, I started learning some sql and how to use it with C#. Since I also know nothing about asp/ado(online C#), I am writing a simple WPF program.
Here is the goal:
Generate 50 users in a database.
Randomly generate numbers that are added to each user in the form of posts/likes/dislikes
Add a search to look up an user
Once you select a user, graphically(text or whatever) show the number of posts-likes-dislikes
Simple enough. Since I don't know anything about sql, anytime I do something bizarre, let me know
. I won't release an application to run until there is something solid, however, I will post my code here.
Not trying to get too serious into it right now. Just looking to get my feet wet and provide an example if it is needed by a potential employer.
Current Code(latest update will always be here):
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Data.Sql;
using System.Data.SqlClient;
namespace sqlWPF
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
SqlConnection sqlConnection = new SqlConnection();
public MainWindow()
{
InitializeComponent();
try
{
sqlConnection.Open();
}
catch (Exception e)
{
textBlock1.Text.Insert(0, e.ToString());
}
}
private void generateButton_Click(object sender, RoutedEventArgs e)
{
//Will be used to generate 50 users onto the database
}
}
}