Hi guys,
I am new to the QueryFactory. I´ve examine your samples but I didn´t found the answer to the following requirement using "SelfServicing-Scenario":
var qf = new QueryFactory();
var q = qf.FBV
.From(QueryTarget.InnerJoin(qf.Bank).On(BankFields.BLZ == FBVFields.BLZ & BankFields.BLZF == 1))
.Select(() => new
{
Konto = FBVFields.KONTO.As("Konto2").ToValue<decimal>(),
Blz = BankFields.BLZ.As("Blz2").ToValue<decimal>(),
Name = BankFields.NAME.As("Name2").ToValue<string>(),
Bankverbindung = new FBVEntity()
{
BANK = FBVFields.BANK.ToValue<string>(),
BIC = FBVFields.BIC.ToValue<string>(),
BLZ = FBVFields.BLZ.ToValue<decimal>(),
FNR = FBVFields.FNR.ToValue<decimal>(),
IBAN = FBVFields.IBAN.ToValue<string>(),
ID = FBVFields.ID.ToValue<decimal>(),
JAHR = FBVFields.JAHR.ToValue<decimal>(),
KONTO = FBVFields.KONTO.ToValue<decimal>(),
LFD = FBVFields.LFD.ToValue<decimal>()
}
});
Instead of making a copy of the FBVEntity I want a projection of the joined entity.
Something like that:
var q = qf.FBV
.From(QueryTarget.InnerJoin(qf.Bank).On(BankFields.BLZ == FBVFields.BLZ & BankFields.BLZF == 1))
.Select(() => new
{
Bank = ? (BankEntity),
Bankverbindung = ? (FBVEntity)
});
Any suggestions?
Please see signature for Version Information at the bottom.
Regards
Carlo