mysql/sqlserver CodeFirst 完成测试

This commit is contained in:
28810
2018-12-22 18:13:25 +08:00
parent 7a61aea544
commit 0ff422eeb6
26 changed files with 712 additions and 1067 deletions

View File

@ -7,6 +7,24 @@ using Xunit;
namespace FreeSql.Tests.MySql {
public class MySqlCodeFirstTest {
[Fact]
public void AddField() {
var sql = g.mysql.CodeFirst.GetComparisonDDLStatements<TopicAddField>();
var id = g.mysql.Insert<TopicAddField>().AppendData(new TopicAddField { }).ExecuteIdentity();
}
public class TopicAddField {
[Column(IsIdentity = true)]
public int? Id { get; set; }
public int name { get; set; }
[Column(DbType = "varchar(200) not null", OldName = "title")]
public string title222 { get; set; } = "10";
}
[Fact]
public void GetComparisonDDLStatements() {