to date I have never dealed with serious DB programming in "native" languages (I am while using "native" word because opposition to web-based languages like PHP, thus I suppose C# is just one of individuals "native" languages. Most likely I ought to use different word, but I'm not sure any).
Thus I am searching for among DB application in C#. This situation should show how you can:
- add, remove, edit records
- list records
- handle relations
most significant for me personally would be to discover the proper method of doing the above mentioned things, in example - staying away from loading the entire table to memory (hey, it could have 500 000 records [or even more ) ])
Among what I am searching for is P4A demo - items catalog. Nevertheless this is designed in PHP ) http://p4a.crealabsfoundation.org/demo/
First, good question because I'm not sure associated with a great DeskTop/Db sample programs.
You'll have to choose a technology first, C# is only the language. You've only indicated Desktop, that leaves you with many different options:
- WinForms + DataSets (classic 2003 vintage)
- WinForms + DataReaders (more lowlevel)
- WinForms + Entity Framework
- WPF + DataSets
- WPF + Entity Framework
- WPF + MVVM + Entity Framework
- SilverLight + Entity Framework
- SilverLight + Data Services
More combinations are possible, and you will find other (third party) ORMs for example NHibernate.
The WinForms+Datasets/DataReaders may be the earliest and easiest tech but not so OOP. You'll find lots of small samples and videos on WindowsClient.NET. Don't disregard the VisualBasic samples.
I'll refer to it as excellent for small programs, less appropriate for bigger ones.
The Entity Framework (EF) is more recent, plenty of (recent) blogging about particulars. I discovered one small but instead complete sample on MSDN (however i could not locate an associated article). Do have a look should you consider an ORM.
Excellent for bigger programs because it supports better adding and (unit-)testing.
You will find various good examples in C#/.Internet on codeplex (take for instance MVC Music Store if you wish to opt for MVC and EF) and several other websites.
The good examples you are searching for rely on what application you are building. Apply for Linq2SQL or EntityFramework (Linq2Entities) whenever using the databases, if you are not so acquainted with SQL (although it helps - a great deal), or even the classes in System.Data.SqlClient for instance.
Either option enables you to definitely perform the procedures you pointed out above.