Skip to content

Commit ee81fc3

Browse files
committed
Pass schema name to CreateGetDelegate method
1 parent 167c9f1 commit ee81fc3

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

Simple.Data.BehaviourTest/GetTest.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ public void TestGetWithSingleColumn()
3636
Parameter(0).Is(1);
3737
}
3838

39+
[Test]
40+
public void TestSchemaQualifiedGetWithSingleColumn()
41+
{
42+
_db.dbo.Users.Get(1);
43+
GeneratedSqlIs("select " + UsersColumns + " from [dbo].[users] where [id] = @p1");
44+
Parameter(0).Is(1);
45+
}
46+
3947
[Test]
4048
public void TestGetWithTwoColumns()
4149
{

Simple.Data/Commands/GetCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public Func<object[], object> CreateDelegate(DataStrategy dataStrategy, DynamicT
3939
if (dataStrategy is SimpleTransaction) return null;
4040

4141
var func = dataStrategy.GetAdapter().OptimizingDelegateFactory.CreateGetDelegate(dataStrategy.GetAdapter(),
42-
table.GetName(), args);
42+
table.GetQualifiedName(), args);
4343
return a =>
4444
{
4545
var data = func(a);

0 commit comments

Comments
 (0)