Click to See Complete Forum and Search --> : Linq to sql


asaffff
October 4th, 2010, 03:03 PM
Hi everyone
I try to get a data from MySql db using LINQ but I think that something is missing.
in every example that I saw its the same.
well I look at the LINQ query and it all understood except how I tell the compiler in which db to search for.
for instance...

Dim q = From e In db.Employees _
Select New Name With {.FirstName = e.FirstName, .LastName = e.LastName}o

how the compiler should know what is db.Employee???
Thank you all..

dglienna
October 14th, 2010, 12:05 AM
You'd set up the connection string, and have the IDE open it before the LINQ statement executes. You can change the connection string to open MySQL, but they aren't exactly the same, and you'd have to modify things accordingly.

I'd suggest MSSQL or SQL Express.