Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
LINQ to SQL
WhatsApp
Ahmed EL Bohoty
13y
10.2k
0
0
100
Article
The target from this project is to know the following:
How to make update, select, delete, select using LINQ to SQL.
How to navigate between records using BindingSource Control.
Mapping Tables to Classes:
Attach or create database and create a new Windows Application Project.
Then right click on your project
name
inside Solution Explorer and choose Add > New Item option.
You will see the following Add New Item dialog box on your screens.
Click the Data category on the left hand side and select LINQ to SQL Classes template from the available templates list.
Give the file same name as the database as Ahmed.dbml in my case and click the Add button.
The Object Relational Designer appears inside Visual Studio asking you to create data classes by dragging items from Server Explorer or Toolbox to the design surface.
You need to add a database connection inside Server Explorer to drag database tables to the designer.
Make sure your Server Explorer is visible and if your Server Explorer is not visible go to View menu and click Server Explorer. Inside Server Explorer right click on Data Connections and click Add Connection option.
You will see Add Connection dialog box appearing on screen asking you information about your data source.
Code Steps:
Inserting a single record
Deleting Records
Updating Records
Navigation between Records
erver'>
LINQ to SQL
How to make update LINQ to SQL
How to make select LINQ to SQL
How to delete LINQ to SQL
How to navigate between records using BindingSource Control.
LINQ
SQL
.net
Up Next
Ebook Download
View all
Printing in C# Made Easy
Read by 22.4k people
Download Now!
Learn
View all
Membership not found