Iterate through properties and values of an object returned via a linq query on a domain model

后端 未结 3 2005
旧巷少年郎
旧巷少年郎 2021-02-01 01:26

I have a custom entity in a relational database that I have mapped to the CLR via a domain model. So by using the following statement, I can pull in an entity from my database i

3条回答
  •  一生所求
    2021-02-01 02:15

    If you are using OpenAccess you always have the complete information about your model classes at your disposal. The information there is retrieved from your mapping which means that you needn't reflect over your classes (no overhead).

    Just browse trough context.Metadata.PersistentTypes for all of your classes mapping information.

提交回复
热议问题