FreeSql (b) automatically migrate entity

FreeSql support CodeFirst migrate to the database structure, this should be (O / RM) must be a standard feature.

And other (O / RM) different FreeSql support more database features, not just the support base data type, which is both an advantage and disadvantage the advantage of full use of the database features supporting development, the disadvantage is difficult to switch databases. The concept of different programmers may not be the same as function libraries FreeSql support to the extreme, it is another question as to whether the use of technology to measure the project team.

Although a variety of database adaptation logic is very complex, FreeSql always uphold the principle of optimization program developed habits to achieve as much as possible, in the middle encountered some non-technical can not overcome the problem, such as a custom database type, and the entity class itself is a conflict, in order to reduce cost, like database function is not supported.

IFreeSql fsql = new FreeSql.FreeSqlBuilder()
    .UseConnectionString(FreeSql.DataType.MySql, "Data Source=127.0.0.1;Port=3306;User ID=root;Password=root;Initial Catalog=cccddd;Charset=utf8;SslMode=none;Max pool size=10")
    .UseAutoSyncStructure(true) //自动同步实体结构【开发环境必备】
    .Build();

Guess you like

Origin www.cnblogs.com/FreeSql/p/11531301.html