.NET Framework - "LINQ to SQL" and "LINQ to Entity"
Asked By Peter
12-Feb-09 04:40 AM
Hi
I do not know these tools ("LINQ to SQL" and "LINQ to Entity"), and I
would like some good resources to learn about them.
They seem very similar - but from what I gather, LINQ to Entity is more
complex, and more of an OR/M tool than LINQ to SQL is.
Which would be the best to concentrate on, given that I have no
experience with either?
How do they stack up against NHibernate?
Thank you,
Peter
NHibernate
(1)
LINQ
(1)
Enitity
(1)
Peter replied...
And is it called "LINQ to Enitity" or "LINQ to Entities"?

Linq-to-Sql var null question or observation .NET Framework This is more an observation than MyMatchingTables = null, but rather I get zero hits (or .Count = 0). Must be built into Linq-to-Sql. I have been using it for years but this is the first time AField.StartsWith(aString) select X; / / why is var MyMatchingTables never null? Must be built into Linq to Sql to never return null? myMyTableList = MyMatchingTables.ToList(); } catch (Exception ex) { Debug.WriteLine(ex 1) Visual Studio 2008 (1) Visual Studio 2010 (1) Entity Framework (1) Visual Studio (1) NHibernate (1) Silverlight (1) How is a List<T> null? it is a collection. The collection the point So this could return a var MyMatchingTables = 3D null? But I thought in Linq-to-Sql that is not allowed? So it will throw an exception (in the try a row out of the table encapsulated as an object / entity, as that is what Linq does. What is Language Integrated Query? LINQ is a Microsoft .NET Framework component that adds native data querying capabilities to .NET languages. Microsoft LINQ defines a set of query operators that can be used to query, project and filter
Is Linq to SQL any good? .NET Framework I am a big fan of linq but in my opinion linq to sql is a complete waste of time. Why on earth take something that is difficult to write by creating a translation layer. I see people here struggling to write linq to sql queries. It also creates the problem of being locked into a particular product 1) Entity Framework (1) Visual Studio (1) Silverlight (1) Oracle (1) If we ignore the LINQ to SQL vs LINQ to EF aspect. You should use LINQ to EF not LINQ to SQL. .NET wanted an ORM. Many people including me like ORM's for certain
linq versus BindingSource. .NET Framework Hello, I think that BindingSource is old fashion attitude. I use filter, I need to retrieve the table data). I want to change my code using linq instead. Before I change 100, 000 lines of code, I need to know whether the linq overcome the performance problems, and is linq indeed is the best way that good for convenience and also good for performance? Is else can I use instead of using BindingSource? Also : Can I write into database via linq? (that is must). Thanks :) C# Discussions SQL Server (1) Entity Framework (1) IDbDataParameter (1) IDbDataAdapter (1) Visual Studio (1) NHibernate (1) DbProviderFactory (1) IDbTransaction (1) When you have a question it is a good idea you binding datatables or custom collections? What database are you using? Are you interested in Linq to Datasets, Linq to SQL, Linq to Objects, Linq to XML, or Linq to Entities? Why do you
LinQ To Sql Provider - - do we have to create our own? .NET Framework AdventureWorksDataContext dataContext = new contact.EmailPromotion = = 1 select contact; I should probably ask this first: - -> > AdventureWorksDataContext is this the LinQ To Sql provider? If no - - then where does AdventureWorksDataContext come from? If yes, do we for like another data source)? I found an article on msdn Walkthrough: Creating an IQueryable LINQ Provider at http: / / msdn.microsoft.com / en-us / library / bb546158.aspx This seemed fairly involved. If this is the way it is done for LinQ To Sql then I am missing the improved value of this over someting like: SqlConnection see is that you would have the ability to debug the Select Statement with the LinQ approach. Am I putting the pieces together correctly here? Rich * ** Sent via Developersdex http: / / www Server (1) Entity Framework (1) Visual Studio (1) SqlDataAdapter (1) SqlConnection (1) ADO.NET (1) LINQ (1) FirstOrDeFault (1) No, if working with SQL Server you would use the classes in System.Data.Linq for the Sql Provider. AdventureWorksDataContext is a class that inherits from DataContext, much in the a typed DataSet is just an autogenerated class which inherits from DataSet. You *can* use linq-to-Sql directly by means of the DataContext class, but then you would need to
Kein "First"bei LINQ? .NET Framework Hi, mit dim q = from bla in blub bekomme ich ein IEnumerable(Of hat dann den Typ <Typ> . Da Extension members wie 'First' wohl vermutlich (auch) f?r LINQ geschaffen wurden, m?sste es doch irgendwie implementiert sein, oder? So in etwa: dim o bersehen? - - Armin VB.NET - German Discussions TypeConverterAttribute (1) OrderByDescending (1) FirstOrDefault (1) VB.NET (1) LINQ (1) VB (1) Enumerable (1) Compiler (1) Du kannst den From-Ausdruck klammern: Dim o rlich kann ich das in eine Zeile setzen, aber dann ist das First trotzdem kein LINQ-Ausdruck den ich ja suche. Das Beispiel war nat?rlich vereinfacht, um darzustellen, dass ich 06.2010 13:50, schrieb Peter Fleischer: Den Aufruf der First-Methode ohne Anwendung von LINQ habe ich schon im meinem OP drin. Deine Antwort enth?lt deswegen keinen Mehrwert. Darauf Wei? nicht, was du mir mit der Ausf?hrung sagen willst. Ich wollte lediglich per LINQ das erste Element erhalten. L?sung hab ich mittlerweile gepostet. - - Armin Hi Armin, die Anweisung nicht. Die Aufgabe lautet das erste Element zu erhalten. Die Unterscheidung ist ohne oder mit LINQ. Meine Frage war von Anfang an, wie es _mit_ LINQ geht. Du hast geantwortet wie es ohne geht, aber das habe ich bereits in meinem