0

Given two basic types:

 public class Employee
{
    public long Id { get; set; }
    public long GlobalId { get; set; }
    public string Name { get; set; }
}

public class Identifier
{
    public long GlobalId { get; set; }
    public long EmployerId { get; set; }
}

How can OrmLite be used to perform the following common query?

SELECT Employee.Id, Employee.Name FROM Employee 
INNER JOIN Identifier ON Employee.GlobalId = Identifier.GlobalId
WHERE Identifier.EmployerId = @employerId
EkoostikMartin
  • 6,831
  • 2
  • 33
  • 62
Jeremy Smith
  • 1,349
  • 8
  • 15
  • Have you seen this http://stackoverflow.com/questions/7301418/ormlite-inner-join-on-three-tables so you can do `Employees.join(Identifier)` – user1477388 Feb 20 '14 at 19:06
  • 1
    This link gives several join examples - https://github.com/ServiceStack/ServiceStack.OrmLite/blob/895ce88ae65575f604c19fb6427898baa0af980e/src/SqliteExpressionsTest/JoinTest.cs – EkoostikMartin Feb 20 '14 at 19:11

0 Answers0