简体   繁体   中英

Ways of accessing MySQL from C#/WPF

I'm new at WPF and C# and I'd like to know the best way of accessing MySQL.

Googling a little bit I've seen there's a Linq provider for MySQL. Is that the best way? http://code2code.net/DB_Linq/

I've never used Linq before so I'll start today unless somebody knows a better way of doing that.

Thanks in advance

You should use the official MySQL ADO.NET provider . Version 6.0 introduces basic support for Entity Framework

It depends! If I were coaching someone who was just starting out, I wouldn't start them out on LINQ. You said you were just starting with C#, but maybe you have some depth in other environments, particularly with databases and maybe you are familiar with ORM. IF that is true, then by all means dive head first into LINQ. If not, then I'd suggest using ADO.NET for your database access in your first projects - it is simpler to start with and is somewhat foundational for other alternatives.

Why not use NHibernate ?

/Broken record.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM