?????.MySQL Connector/Net
???????????????MySQL??????????? MySQL Connector/Net
????????????????????????????а????MySQL?????????MySQL Connector/Net
??????????? ?? http://dev.mysql.com/downloads/connector/net/
?????????: ???  MySQL Connector/Net ??????? mysql-connector-net-6.8.3.msi??
??????.????????????????MySQL
?????????п???????????

??????.???????????
???????????????Mvc???
?????????:??????Nuget?????  ????:MySql.Data && MySql.Data.Entity  ??????
????????????????????????(?????SqlServer???????????????????????“wahaha”)
????1 <!--????MySql????????????????charset=utf8???????MySql?б????????????????????????-->
????2     <add name="DefaultConnection" connectionString="server=127.0.0.1;user id=root;password=????;persist security info=True;database=?????????;charset=utf8;" providerName="MySql.Data.MySqlClient" />
??????.???????
1  public class Person
2     {
3         [Key]
4         public int pid { get; set; }
5         [Required]
6         [StringLength(50)]
7         [Display(Name ="????")]
8         public string pname { get; set; }
9         [StringLength(50)]
10         [Display(Name = "????")]
11         public  string pbirthday { get; set; }
12     }
??????.????????????
1    [DbConfigurationType(typeof(MySqlEFConfiguration))]
2     public  class MyContext:DbContext
3     {
4         public DbSet<Person> Person { get; set; }
5
6         public MyContext()
7             : base("DefaultConnection")
8         {
9             Database.CreateIfNotExists();
10         }
11     }
??????.?????????????????????

???????????????????MySql???????????