Skip to content

Instantly share code, notes, and snippets.

@FransBouma
Created March 17, 2016 16:20
Show Gist options
  • Save FransBouma/6a3d729cf1a6d4c304ea to your computer and use it in GitHub Desktop.
Save FransBouma/6a3d729cf1a6d4c304ea to your computer and use it in GitHub Desktop.
Issue
[Test]
public void SingleOnWhereOnGetQueryable()
{
using(var adapter = new DataAccessAdapter())
{
var metaData = new LinqMetaData(adapter);
var r = metaData.GetQueryableForEntity<CustomerEntity>().Where(c=>c.CustomerId == "ALFKI").Single();
Assert.AreEqual("ALFKI", r.CustomerId);
}
}
SELECT [LPA_L1].[Address],
[LPA_L1].[City],
[LPA_L1].[CompanyName],
[LPA_L1].[ContactName],
[LPA_L1].[ContactTitle],
[LPA_L1].[Country],
[LPA_L1].[CustomerID] AS [CustomerId],
[LPA_L1].[Fax],
[LPA_L1].[Phone],
[LPA_L1].[PostalCode],
[LPA_L1].[Region]
FROM [Northwind].[dbo].[Customers] [LPA_L1]
WHERE ((([LPA_L1].[CustomerID] = 'ALFKI' /* @p1 */)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment