C# Tutorial

8,831 views

Published on

My Powerpoint for our tutorial on C#.NET

1 Comment
1 Like
Statistics
Notes
  • GREAT ONE
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
8,831
On SlideShare
0
From Embeds
0
Number of Embeds
11
Actions
Shares
0
Downloads
408
Comments
1
Likes
1
Embeds 0
No embeds

No notes for slide

C# Tutorial

  1. 1. See SharpA C# programming tutorialPrepared By: JM Ramos
  2. 2. Hello World – A quick glance of thistutorial • Introduction to C#.net • Introduction to SQL • The OLEDB Library • Setting up your connection string • Creating the connection Class • Create Read Update Delete (CRUD)
  3. 3. What’s with C# • The Language of choice in the .NET Framework • Comes with a clear syntax, derived from C/C++ • Ease with learning the language • C# is a “Type Safe Language”
  4. 4. What can you do with C# • Windows Applications • Web Applications (ASP.NET) • Web Services (WCF)
  5. 5. Structured Query Language (SQL) • A language use for manipulating and retrieving records in a RDBMS • Based on Relational Algebra tuple relational calculus, its scope includes data insert, query, update and delete, schema creation and modification, and data access control.
  6. 6. Adding Records to your Table INSERT INTO table_name(column1,column2) VALUES(value1,value2); Specifying the columns and corresponding values on those columns.
  7. 7. Adding Records Cont.. INSERT INTO table_name VALUES(value1,value2,..valueN); Use for adding records provided that the number of values match the number of columns
  8. 8. Sample INSERT INTOStatement Let’s assume we have table phonebook with 3 columns, FirstName, LastName, and PhoneNumber INSERT INTO phonebook VALUES(‘jm’,’ramos’,’123’);
  9. 9. Modifyng Records UPDATE table_name SET column1 = value1, column2 = value2 WHERE id = my_id; Updates the record that has the id of my_id;
  10. 10. Sample UPDATE Statement UPDATE Phonebook SET PhoneNumber = ‘09099234556’ WHERE FirstName = ‘jm’; Updates all records that has a firstname of ‘jm’
  11. 11. Deleting Records DELETE FROM table_name WHERE id = my_id; Deletes the record the has the id = my_id. If the user fails to put a where condition, all records from the table will be lost.
  12. 12. Retrieving Records SELECT (column1, column2) FROM table_name WHERE id = my_id; Returns a result set containing columns specified in the query satisfying the condition Where clause is optional
  13. 13. Enough with the Crap. Coding na! • :DDDDD
  14. 14. Things to Remember: • String data types in SQL should be enclosed with single quotes. • Values are separated by commas • End every statement with Semicolon • Just get what you need. • Use pascal casing.
  15. 15. References • Beginning Visual C# 2010 (Watson 2010) • http://en.wikipedia.org/wiki/SQL

×