SlideShare a Scribd company logo
1 of 5
Download to read offline
LINQ to SQL
OPEN VS 2015.
Right click on you project solution.
Click on add => add new Item
Or press short key Ctrl+Shift+A
After this
Click on DATA
After this below screen will be open…
Click on Server Explorer or press short key Ctrl+ALT+S
Go to Data Connection => Your database => tables
And just drag and drop the table in window.
That’s it. If your class name is CD use CDDataContext object to connect with database.
In my case my class name is CD so I make object of CDDataContext for database connection. And it
appears at:
LINQ to SQL

More Related Content

More from Salman Mushtaq

More from Salman Mushtaq (7)

Bootstrap 3 Lecture 5
Bootstrap 3 Lecture 5Bootstrap 3 Lecture 5
Bootstrap 3 Lecture 5
 
Captcha
CaptchaCaptcha
Captcha
 
ADO DOT NET
ADO DOT NETADO DOT NET
ADO DOT NET
 
Contact Book Version 1.0
Contact Book Version 1.0Contact Book Version 1.0
Contact Book Version 1.0
 
Entity frame work by Salman Mushtaq -1-
Entity frame work by Salman Mushtaq -1-Entity frame work by Salman Mushtaq -1-
Entity frame work by Salman Mushtaq -1-
 
Database By Salman Mushtaq
Database By Salman MushtaqDatabase By Salman Mushtaq
Database By Salman Mushtaq
 
Serialization
SerializationSerialization
Serialization
 

LINQ to SQL

  • 1. LINQ to SQL OPEN VS 2015. Right click on you project solution. Click on add => add new Item
  • 2. Or press short key Ctrl+Shift+A After this Click on DATA
  • 3. After this below screen will be open… Click on Server Explorer or press short key Ctrl+ALT+S Go to Data Connection => Your database => tables
  • 4. And just drag and drop the table in window. That’s it. If your class name is CD use CDDataContext object to connect with database. In my case my class name is CD so I make object of CDDataContext for database connection. And it appears at: