c# - Globalization with NHibernate -


How would you build your domain objects and how to create your related NHibernate mapping files for a multi-language application? The UI part is stored in the resource files, but user data needs to go into the database.

I want to do the following:

  product p = DALProduct.getByID (2) p.name // Results in the language of current UIcolor  

I have come to know that it is really close: As I am new to NHibernate, I am not sure that it will be fully working for enterprise solutions

Do you have other Have suggestions? How do you solve such a scenario?

It should be flexible:

  • Inserting, updating and selecting
  • Archive
/ Div>

Ideas post is a great start to how it should be designed.

This will work fully enterprise solutions. The different table is like any other list of names.

Edit - Option:

Use another unit to edit the data

There is a product unit in which the list As all the names are. Localized products contain only current language names.

Obtain the filtered unit

  • By filtering the mapping as described in the blog.
  • Along with this, with Transformers (Transformers. Elias Toben) or 'Select new localeproduct (id, name, award ...)'. Local products will not be mapped in this case. The second level should be cash-friendly.

If you have many references to the product, then it is probably not very good for two sections, because you do not know what square reference should be.

; }} IDictionary & lt; Int, string & gt; Get AllProductNames { Private set; }}

Local product names (get) and have all the attributes of the product name.

  • Do not filter them exactly :-) The network is a bit of overhead. If you have only 3 to 5 languages, then this is not so bad if you have 20 or more, it's probably better to filter the names.
  • Use an (optional) filter as described in the blog, but on product names
  • ResultTransformer (CriteriaUtil.AliasToEntityMap) to filter one (optional) names.

Honestly, I will choose an option which does not require filters in the files that die. The filters are related to the query, where they are more qualified.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -