-
Notifications
You must be signed in to change notification settings - Fork 0
mdw-archives/DatabaseAccessTutorial
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Here's an example of setting up a very simple database and querying it - all with raw sql statements via the interface of the System.Data.IDbConnection object. I'm using the System.Data.SQLite .dll, which is not native to the .NET framework, I downloaded it and referenced it within this project from within the lib folder. I placed the connection string stuff in an application configuration file called App.config which, ideally, allows you to swap out the database without having to change code and recompile. Let me know if you have any quesitons or if this won't run. You should just be able to hit F5 and see the output of 'John Smith' as he has the 'PersonId' of '1' and that is what the query looks for. A good experiment after running the program and poking around a bit would be to swap out SQLite for SQL Server.
About
Simple example using basic database abstractions from System.Data
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published