My question is this. When trying to decide between using the Entity Framework and LINQ to SQL as an ORM, I am trying to figure out whether to use MSSQL or MYSQL....which one is preferred?
I heard that LINQ to SQL is tied to SQL Server is that still true?
NET integration story (C#, Linq, Entity Framework, etc.) in SQL Server is better is what I heard,please share your opinions
LINQ to SQL was introduced as part of .net 3.5 from memory. I don't see why you'd use it over EntityFramework now however, EF has come a long way and provides as far as I'm aware all the features LINQ to SQL did:
https://github.com/aspnet/EntityFramework6
EF and Linq to Sql are both Microsoft products, and SQL Server is a Microsoft product. Mysql is not a Microsoft product. In my experience, things work better if you stick with the same vendor. If you go with EF or Linq to SQL, and you have no other reasons to choose one over the other, my guess is you'll be happier if you pair it with SQL Server.
Related
I am considering migrating from SQL Server 2008 to MySQL to save on licencing costs.
I was wanting to know if this would work and what sort of problems it might cause.
As I used EF Code first for the database, my databse is automatically generated based on my class structure. Would this, the entity framework and LINQ still work with a MySQL database?
Yes EF and LINQ works with MySQL as well, please take a look at these posts.
Entity Framework 5.0 code-first with MySQL Connector 6.6.5.0 on .Net 4.5
and
MySql and Entity Framework Code First
Does anyone know if there is anything new in LINQ to SQL in the 4.0 Framework? I know they said LINQ to SQL was not going to be supported anymore in favor of pushing the Entity Framework, but maybe they added new features or fixed some bugs.
Damien Guard compiled a comprehensive list of changes to LINQ to SQL in .NET 4.
Most changes are minor, but there were various improvements made, especially in performance and stability.
I want to create either "LINQ to SQL" classes or use "Entity Framework" from Visual Studio Express 2010. When I attempt to add a data source my only options are:
"Microsoft Access Database File"
"Microsoft SQL Server Compact 3.5"
"Microsoft SQL Server Database File"
Do I need VS2010 Pro to use LINQ to SQL or EF? I thought I could do all of this from Express. I even went so far as to install, "Microsoft SQL Server 2008 Native Client" and it still doesn't show SQL Server 2008 as a data source.
Thanks!
p.s. I feel like a complete idiot that I cannot get this to work
LINQ to SQL (L2S) and LINQ to Entities (L2E) (aka Entity Framework) are part of the .NET Framework, and so are part of .NET regardless of what version of VS you use.
Both first appeared in 3.5 and are updated in 4.0, although LINQ to SQL won't be progressed any further in terms of functionality. Hence there isn't a dependency on the IDE. What might be missing is the LINQ to SQL or LINQ to Entity designers, but I don't think from memory they are.
If you select Add New Item and look in the Data group you should find "LINQ to SQL classes" and "ADO.NET Entity Data Model" - if not perhaps the designers are not part of Express.
[edit]
Seems this has been asked before:
Connecting to SQL Server with Visual Studio Express Editions
For LINQ, use SQLMetal to generate the spew and then just form connection string and let the code connect - you shoudldn't let VS mess with your data representation anyway. SQLMetal's spew is very clean and you can also edit it, once you learn what's what, to make it lighter - or heavier :-) - there are hooks for more code as well.
Before that check that your SQL instance is running and visible - VS installed SQL Express as default instance it can prevent real SQL's default instance from even being visible - a lot of uninstalls in your future if that happened.
I've got a vertical market Dot Net Framework 1.1 C#/WinForms/SQL Server 2000 application. Currently it uses ADO.Net and Microsoft's SQLHelper for CRUD operations.
I've successfully converted it to Dot Net Framework 4 C#/WinForms/ SQL Server 2008. What I'd like to do is also offer my customers the OPTION to use SQL Azure as a backend storage for their data instead of local/LAN SQL Server.
If I know SQL Azure is in my application's future, should I:
A. Switch to LINQ to SQL
or
B. Swith to Entity Framework
or
C. Stick with ADO.Net and SQLHelper
?
Thanks !
I would switch to Entity Framework, it works just fine with SQLAzure and is the recommended ORM by Microsoft for .Net 4
ADO.net works just fine,
My personal favorite is Linq2Sql which works fine with azure
Microsoft is now recommending that everyone switch to entity framework
Has anyone used any of the utilities out there for LINQ to MySQL? Do you know which one is best?
So far I know of LINQ for NHibernate, and DBLinq
There is also LINQ to LLBLGEN, which then can support many, many databases.
From LLBLGEN's Feature Page
Support for SQL Server (MSDE, SQL Server
7/2000/2005/Express, SQL CE 2.0, 3.0,
3.5), SQL Server CE Desktop (New!), Oracle (Oracle 8i / 9i /10g),
PostgreSQL 7.4+/8.x, Firebird 1.x /
2.x, IBM DB2 UDB (7.x/8.x/9.x), MySQL (4.x, 5.x), Sybase Adaptive Server
Enterprise (ASE) (New!), Sybase SQL
iAnywhere (ASA) (New!) and MS Access
2000/XP/2003/2007
There is also Mindscape LightSpeed, which works with MySQL amongst other databases, and has a LINQ provider.
Try our MySQL-specific LINQ to SQL implementation.
Overview is available here.
You're right, LINQ to NHibernate will provide this sort of functionality as will the entity framework with a MySQL provider. I don't know of any other way of doing it as LINQ to SQL was very much specific to Microsoft SQL Server.