0

In my model I have a store named MyModel.MyStore. Once the BOM producer run, it becomes a constant whose name is MyModel_MyStoreStoreName

Given a simple producer, I want to add the persistence statement; usually

CodeFluent.Runtime.CodeFluentPersistence persistence = CodeFluentContext.Get(MyModel.Models.Constants.MyModel_MyStoreStoreName).Persistence;

From the entity I've seen I can get the defined store name, but I didn't find any way to have the final store name as constant; i.e. MyModel_MyStoreStoreName;

One way I found is to iterate through methods to filter statement I'm interested in. What is the most reliable way to fetch/build this persistence statement ?

Thanks for your answer,

4

1 回答 1

1

The Business Object Model Producer (BOM) use the following method to generate the name of the constant:

CodeFluent.Producers.CodeDom.CodeDomLocal.GetStoreFieldName(entity.Store.Name)
于 2016-06-16T08:22:58.897 回答