I’m trying to wrap my head around databases, and as a way of learning, I’m making a poker tracker program using C# and WPF.
Some of the tutorials I have seen on LINQ to SQL use “LINQ to SQL classes” that show the databases and their relations in a neat way, but I’m not really sure how to use it and exactly what code is generated from it.
Say I want to log hand histories in one table, containing data like hand ID, player 1, player 2 etc, community cards and pot size. In another table I want info on all the players I have met. So every hand history logged is connected to at least 1 logged player, and up to 8 connections.
How do you make these neat visual connections between the tables that I have seen in the tutorials, and what would be the best approach in this example?
Thanks!
Better to use Linq to Entity Framework because its performance is better than Linq to SQL.
code example for EF http://www.codeproject.com/Articles/246861/LINQ-to-Entities-Basic-Concepts-and-Features