Making Linq operations to a database in Data Connections

I am using Visual Studo 2012 and SQLExpress.

I am attempting to make Linq operations to a database in Data Connections. The database is on a local server on my computer. It already shows up in the Server Explorer -> Data Connections pane.

How do I actually obtain the data source to make operations against it in my program?

Answers


You have to add the Linq-to-SQL entity objects. In Visual Studio:

  1. Right click on your project and Add Item
  2. Add the LINQ to SQL Classes under Data
  3. Open the new DataClasses.dbml project file in VS
  4. Drag database objects (tables, stored procedures) onto the pane
  5. In your code, instantiate the DataContext class, and you're good to go.

Need Your Help

MSBUILD publish does not publish a xsd schema file

msbuild web-services

I am using MSbuild to publish my webservices projects on the command line using the following

Weak pointer to this in constructor

c++ boost constructor shared-ptr weak-ptr

I understand it is not possible to obtain a shared_ptr by calling shared_from_this() from the constructor of a class, as the object is not yet constructed. Is it possible however to obtain a weak_p...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.