Here is the syntax for VB. I am calling your table as 'table_name' as I don't know it's real name :P
Main Topics
Browse All TopicsHi
I have a very simple requirement which I'm struggling to get my head round
I have linked my SQL datatables up to my VS2008 VB.NET app and I want to use the generated classes in the following manner (this is to keep it consistent with existing code structure which I inherited)
--------------------------
dim _Customer as (some LINQ class - this is one of my questions)
_customer.get(me.cust_id.t
_customer.Turnover = 123456
_customer.update
--------------------------
so it looks VERY simple but hwo do I get to do that with LINQ classes?
Many thanks in advance
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: naspinskiPosted on 2008-09-03 at 23:30:42ID: 22384654
This is very simple, you just have to do a few things:
First, you have to make your DBML, which will make your DataContext class which is the go-between for LINQ and your DB. To do this:
-Right click on your solution and add->new item, click LINQ-to-SQL Classes, name it something like 'Customers.dbml'
-Now that you are in your dbml, open your server explorer and find the table(s) you want to use from your database, and drag them into your dbml. Save your DBML.
Now that that is made, you have your business layer set up and you can access it like this:
Select allOpen in new window