Core Concepts > Advanced Queries

Multiple Schemas

dbExpression supports queries using more than one schema. For example, the following query uses fields from the dbo and sec schema:

IEnumerable<dynamic> purchases = db.SelectMany(
        sec.Person.Id,
        sec.Person.SocialSecurityNumber,            
        dbo.Purchase.PurchaseDate,
        dbo.Purchase.OrderNumber,
        dbo.Purchase.TotalPurchaseAmount
    )
    .From(sec.Person)
    .InnerJoin(dbo.Purchase).On(sec.Person.Id == dbo.Purchase.PersonId)
    .Execute();
Previous
Enums

© 2024 dbExpression. All rights reserved.