Beispiel #1
0
        public void AssociationConcat([DataSources] string context)
        {
            using (var db = GetDataContext(context))
                using (db.CreateLocalTable <TestReceipt>())
                    using (db.CreateLocalTable <TestCustomer>())
                    {
                        var query = db.GetTable <TestReceipt>()
                                    .Concat(db.GetTable <TestReceipt>().TableName(TestReceipt.ExternalReceiptsTableName))
                                    .Select(
                            i =>
                            new { i.ReceiptNo, a = TestCustomer.GetName(i.Customer.BillingGroup) });

                        Assert.Throws <LinqToDBException>(() => _ = query.ToArray(),
                                                          "Associations with Concat/Union or other Set operations are not supported.");
                    }
        }