mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-18 20:08:15 +08:00
## v0.3.26
- 修复 SqlServer CodeFirst 迁移多主键的 bug #23;
This commit is contained in:
@ -5,10 +5,7 @@ using Xunit;
|
||||
namespace FreeSql.Tests.DataAnnotations {
|
||||
public class MySqlFluentTest {
|
||||
|
||||
SqlServerFixture _sqlserverFixture;
|
||||
|
||||
public MySqlFluentTest(SqlServerFixture sqlserverFixture) {
|
||||
_sqlserverFixture = sqlserverFixture;
|
||||
public MySqlFluentTest() {
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@ -44,15 +41,6 @@ namespace FreeSql.Tests.DataAnnotations {
|
||||
var t2 = g.mysql.Select<TestFluenttb2>(t2lastId + 1).ToOne();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void GroupPrimaryKey() {
|
||||
_sqlserverFixture.SqlServer.CodeFirst.SyncStructure<TestgroupkeyTb>();
|
||||
g.mysql.CodeFirst.SyncStructure<TestgroupkeyTb>();
|
||||
g.pgsql.CodeFirst.SyncStructure<TestgroupkeyTb>();
|
||||
g.sqlite.CodeFirst.SyncStructure<TestgroupkeyTb>();
|
||||
g.oracle.CodeFirst.SyncStructure<TestgroupkeyTb>();
|
||||
}
|
||||
|
||||
class TestFluenttb1
|
||||
{
|
||||
public int Id { get; set; }
|
||||
@ -66,17 +54,6 @@ namespace FreeSql.Tests.DataAnnotations {
|
||||
[Column(Name = "Idx", IsPrimary = true, IsIdentity = false)]
|
||||
public int Id { get; set; }
|
||||
|
||||
public string name { get; set; } = "defaultValue";
|
||||
}
|
||||
|
||||
[Table(Name = "test_groupkey")]
|
||||
class TestgroupkeyTb {
|
||||
[Column(IsPrimary = true)]
|
||||
public int Id { get; set; }
|
||||
[Column(IsPrimary = true)]
|
||||
public int id2 { get; set; }
|
||||
|
||||
|
||||
public string name { get; set; } = "defaultValue";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user