-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Foreign key example using fluent mapping #693
Comments
UP @schotime , Is there any documentation or example for this question? Below is the data model that I want to map to NPoco, but it is not working, the failure occurs in the Employee property, where NPoco is not being able to map, probably because I made a mistake in the configuration or not this is not possible to do: Entity:
Mapping:
What I need to know is, instead of using query with flat SQL to resolve the foreign key issue, if it is possible to use query without using flat SQL, mapping the nested object. In the case of the data layer, I tried this here:
... but no result As I didn't find a practical example on the Wiki, I was testing the methods within the lambda to see what can be done. If you could help with this I would be grateful. |
@schotime or anyone who can explain.
Is there any practical example that demonstrates the use of a foreign key using NPoco's fluent mapping?
I searched the Wiki but didn't find consistent material, and here in the issues:
#232
#262
However, one was confused and the other remained unanswered in my opinion.
If you can share some expensive example, it would be of great help.
The text was updated successfully, but these errors were encountered: