System.Linq.Dynamic.Core icon indicating copy to clipboard operation
System.Linq.Dynamic.Core copied to clipboard

Selecting shadow properties

Open Gebov opened this issue 4 years ago • 7 comments

How do I do a dynamic select based on a shadow property. I have the bellow code, but it us currently throwing an error that the property does not exist on my object:

await query.Select("new { Title, Content = EF.Property("Content") }").ToDynamicListAsync();

Gebov avatar Nov 25 '22 11:11 Gebov

Looking for the same answer Has anyone any advice?

RedWingBB avatar Jan 26 '23 13:01 RedWingBB

@Gebov Can you please provide a full working console app using EFCore real/example database.

StefH avatar Feb 04 '23 17:02 StefH

Thanks for the response Stef; We solved the problem, we were asking for fields that weren’t in the table

Bill Stamp Chief Software Architect 18 South 5th Street | Suite 100 Quakertown, PA 18951 Direct Dial:215-302-3136 Main Office:800-836-5440 Fax:215-302-3001 www.SynergisSoftware.com Blog|YouTube|Facebook|Twitter|LinkedIn Adept Engineering Document Management & Workflow

This email and any attachments are intended only for the person or entity to which it is addressed and may contain information which is confidential, privileged or otherwise protected from disclosure. Distribution or copying of this email or the information contained herein by anyone other than the intended recipient is prohibited. If you have received this email in error, please immediately notify the sender by return email and please delete and destroy this email and any attachments. From: Stef Heyenrath @.> Sent: Saturday, February 4, 2023 12:41 PM To: zzzprojects/System.Linq.Dynamic.Core @.> Cc: Bill Stamp @.>; Comment @.> Subject: [EXTERNAL] Re: [zzzprojects/System.Linq.Dynamic.Core] Selecting shadow properties (Issue #651)

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

@Gebovhttps://github.com/Gebov Can you please provide a full working console app using EFCore real/example database.

— Reply to this email directly, view it on GitHubhttps://github.com/zzzprojects/System.Linq.Dynamic.Core/issues/651#issuecomment-1416809401, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJ5T6PB3GEHYXZL5XSFID6LWV2ICJANCNFSM6AAAAAASLGUAO4. You are receiving this because you commented.Message ID: @.@.>>

RedWingBB avatar Feb 05 '23 13:02 RedWingBB

@Gebov Can you please provide a full working console app using EFCore real/example database.

StefH avatar Feb 22 '23 17:02 StefH

Thank you Stef for the response

We are good – It was a mistake on our part Our product is a year or so from release, so we are putting all the components in it through QA to make decisions

Regards Bill

Bill Stamp Chief Software Architect 18 South 5th Street | Suite 100 Quakertown, PA 18951 Direct Dial:215-302-3136 Main Office:800-836-5440 Fax:215-302-3001 www.SynergisSoftware.com Blog|YouTube|Facebook|Twitter|LinkedIn Adept Engineering Document Management & Workflow

This email and any attachments are intended only for the person or entity to which it is addressed and may contain information which is confidential, privileged or otherwise protected from disclosure. Distribution or copying of this email or the information contained herein by anyone other than the intended recipient is prohibited. If you have received this email in error, please immediately notify the sender by return email and please delete and destroy this email and any attachments. From: Stef Heyenrath @.> Sent: Wednesday, February 22, 2023 12:22 PM To: zzzprojects/System.Linq.Dynamic.Core @.> Cc: Bill Stamp @.>; Comment @.> Subject: [EXTERNAL] Re: [zzzprojects/System.Linq.Dynamic.Core] Selecting shadow properties (Issue #651)

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

@Gebovhttps://github.com/Gebov Can you please provide a full working console app using EFCore real/example database.

— Reply to this email directly, view it on GitHubhttps://github.com/zzzprojects/System.Linq.Dynamic.Core/issues/651#issuecomment-1440461669, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJ5T6PCR3HJACCL75WPU53DWYZDMBANCNFSM6AAAAAASLGUAO4. You are receiving this because you commented.Message ID: @.@.>>

RedWingBB avatar Feb 22 '23 20:02 RedWingBB

This was a mistake on our part, we simply had some incorrect column names in our query Thanks for your help desk responses

RedWingBB avatar Feb 22 '23 20:02 RedWingBB

@StefH Sadly, I do not have a solution for selecting shadow fields. I switched to creating dynamic runtime types.

Gebov avatar Feb 23 '23 07:02 Gebov