使用SharedContext模式调整FreeSql.Tests的SqlServer连接。

This commit is contained in:
LambertW
2019-03-14 23:17:05 +08:00
parent 89ff4ca44d
commit f25dfe3a14
18 changed files with 246 additions and 78 deletions

View File

@ -1,13 +1,22 @@
using FreeSql.DataAnnotations;
using FreeSql.Tests.DataContext.SqlServer;
using System;
using System.Collections.Generic;
using System.Linq;
using Xunit;
namespace FreeSql.Tests.SqlServerExpression {
[Collection("SqlServerCollection")]
public class StringTest {
ISelect<Topic> select => g.sqlserver.Select<Topic>();
SqlServerFixture _sqlserverFixture;
public StringTest(SqlServerFixture sqlserverFixture)
{
_sqlserverFixture = sqlserverFixture;
}
ISelect<Topic> select => _sqlserverFixture.SqlServer.Select<Topic>();
[Table(Name = "tb_topic")]
class Topic {