Best Way To Implement Multilingual Domain Objects Using NHibernate?

May 19, 2010

What is the best way to design the Domain objects which can have multi-lingual fields. An example can be a Product class with Description being multi-lingual.

I have found few links but could not decide which one is the best way.

http://fabiomaulo.blogspot.com/2009/06/localized-property-with-nhibernate.html
(This stores all localised language data in one field. Can be a problem if we query from Sql)
http://ayende.com/Blog/archive/2006/12/26/LocalizingNHibernateContextualParameters.aspx
(This one has a warning at the beginning that it is a hack and no longer supported)
http://www.webdevbros.net/2009/06/24/create-a-multi-languaged-domain-model-with-nhibernate-and-c/
(This does not describe how multilingual data will be structured in the database.)

Anyone having experience with using NHibernate with multi-lingual data.

View 4 Replies


Similar Messages:

NHibernate Not Persisting Owned Objects?

Jul 30, 2010

I have just gotten a very odd error and I can't explain, or trace it out. My forum entity maintains a list of child forums. The list is internal, and exposed as an ienumerable, along with some methods like AddChild, FindChild and RemoveChild. Now to the code:

[Code]....

I have stepped through this several times, testing values along the way. It works perfectly, so I cannot explain the error. If a parent forum id is given, forumRepository.Update(parent) runs with no errors, it just doesn't actually save the new child to the db.

Incidentally... until I restart VS2010, the nhibernate session actually THINKS it HAS worked, and the new record shows on the page.

View 3 Replies

Nhibernate Interceptors With Domain Context?

Mar 3, 2010

Is it possible (in a clean fashion) to create an audit interceptor in hibernate 2.1 and pass in a domain context to it?What I would like to achieve is to set a Date Time (can be done easy peasy - found loadsa articles after a quick google), but setting an object e.g. a user who created the item, or altered an entity I have yet to find anything which covers this.Since I will not know the object at application request/start up (which is where i have to register the nhibernate interceptor), does anyone know of a suitable workaround?

View 1 Replies

MVC :: Example Of Quick And Easy Domain Model That Is Persistable With NHibernate

Sep 14, 2010

am looking for the best approach to using NHibernate and MVC.net. I have gone through http://www.codeproject.com/KB/architecture/NHibernateArchitecture.aspxSomeone has pointed to the use of Castle project Active record. My aim is to eliminate the need for any nhibernate dependencies within my domain. I want a quick and easy domain model that is persistable with NHibernate.

View 2 Replies

ADO.NET :: How To Implement Codesmith In Nhibernate

Nov 30, 2010

how to implement codesmith in nhibernate.

View 1 Replies

Populate An Unmapped Property Of Domain Object From Result Of Join With Nhibernate

Jun 7, 2010

I have a situation where I have 3 tables: StockItem, Office and StockItemPrice. The price for each StockItem can be different for each Office.

StockItem(
D
Name
)
Office(
ID
Name
)
[code]...

View 2 Replies

Architecture ::mean By Concret Class And Domain Objects&use For Respositary?

Oct 29, 2010

I am using Interface for Respositary.where these can be best used.Also googling to understand these.
What do mean by concret class and domain objects?

View 4 Replies

MVC & AutoMapper (Populate View Model From Parent & Child Domain Objects)

Feb 7, 2011

I have following doimain objects:

public class ComponentType
{
public int ComponentTypeID { get; set; }
public string Component_Type { get; set; }
public string ComponentDesc { get; set; }
}
[code]...

View 2 Replies

Web Forms :: Implement Sub Domain URL Dynamically?

Apr 26, 2010

I want to implement sub domain URL dynamicaly. Like When User login with his/her username in my Web apps made in asp.net 3.5, url chang from www.mydomain.com to username.mydomain.com?means i want to display url from www.mydomain.com to username.mydomain.com?So how can i do it? I seached a lot but cant find right solution?

View 7 Replies

Architecture :: How To Implement A Many-to-many Relationship In A Domain Model Class

Jan 12, 2011

what is considered a many-to-many relationship in a domain model class ? I mean how to implement a many-to-many relationship in a domain model class ? In SQL this is represented by a link table between two table but how this is represented in a domain model driven application ?

View 1 Replies

C# - How To Implement Multiple Login/logout-domains, Single Main Domain In Forms Authentication

Jan 25, 2011

i want to have several domains A, B, C where a user can enter his username and password to login to a common main domain D.

So the user goes to A, B or C, enters his username and password, clicks the "login" button, and is then on the main domain D in a logged in/authenticated state. Then the user does the things he wants to do, and then clicks the logout-button and is then returned to the original domain that he came from, be it A, B or C.

What is the best way to do this?

I currently use forms authentication in ASP.NET 4.0 (C#).

View 1 Replies

Forms Data Controls :: Binding A Repeater To A List Of Objects That Have Child Objects?

Nov 17, 2010

have some Objects, lets say Employee and Role defined as below and I have defined relationships in my database that gives me a list of objects say employees and thanks to my framework each employee object also has a Role object linked via the RoleIDID, UserName, Password, Email, RoleIDRoleID, RoleNameSo in code I can do something like this

Employee emp = dataService_GetEmployeeByID(1);
string RoleName = emp.Role.RoleName;

Now here is my problemI can bind any object in a repeater and it works fine for the first level in my relationship

For instance <%# Eval("UserName") %>

But I need to be able to show the details for my child objects as well (Role) so something like this (which does not work)

<%# Eval("Role.RoleName") %>

View 2 Replies

Forms Data Controls :: Binding An Objects(containing Sub Objects) To A Dropdown List?

Apr 6, 2010

I know how to bind a simple objects to a dropdown list. However I am having problems binding my objects which contains sub objects to the control.i.e. with simple object i just do ddl.DataValueField = "myproperty"
with my objects they contains sub objects which i want to bind. I have tried ddl.DataValueField = "sub-object.myproperty" which doesnt work.

View 2 Replies

Architecture :: Using Static Methods To Build User Objects And Various Other Objects?

Jun 21, 2010

firstly a static class only ever exists once and is not an instance. Any static members (ie static int NoOfPeople;) is stored in one place and is shared between all sessions (like the old global variables).
Now static methods is where i'm not 100% sure. If I have a static method that doesn't use any other static members could this cause inconstant results, example (this is a fairly pointless method but just a quick example of the top of my head)

[Code]....

So in this example if two sessions (or threads) were to call this at the same time - would they both get back the expected results, because the method only uses private data (a, b and totalToReturn).Im sure this sounds a little simple but I will be using static methods to build user objects and various other objects that there will have to be a 100% garentee that the objects will not get mixed up between sessions and the wrong things return to the user.

View 5 Replies

State Management :: How To Keep Current User Session When Redirected To Sub Domain From Main Domain

Feb 17, 2011

I have also installed SSL on a subdomain. I have put payment page under this sub domain.

View 4 Replies

Localization :: Multilingual In VB.NET?

Oct 4, 2010

I need a sample project for Globalization (multilingual) developed in VB.NET (2008).

View 1 Replies

Looking For CMS With Multilingual Support?

Apr 21, 2010

any asp.net cms with "easy" multilingual support?

View 8 Replies

Windows Authentication - Run Application Under Domain Account Without Joining The Domain?

Sep 28, 2010

My feeling says it's not posible but anyway I am curious if there is at least a workaround for accomplish this.Basically I am working at my client site and my machine is not connected to the domain.What I want to do is running a web application locally under a domain account, and using the webdev server.The webapp uses the default authentication, windows authentication that is.I tried using impersonation with domainuser & password but I got the following error Could not create Windows user token from the credentials specified in the config file. Error from the operating system 'Logon failure: unknown user name or bad password.I have to mention that the username and the password are correct.

View 1 Replies

The Trust Relationship Between The Primary Domain And The Trusted Domain Failed

Aug 3, 2010

We have a ASP.NET site that partially depends on forms authentication for login credentials, however the implementation of IPrincipal is completely custom.

But, when running the site on a particular server (which is somewhat semi-hardened when it comes to security), the app crashes when invoking IPrincipal.IsInRole() with the following messsage:

System.SystemException: The trust relationship between the primary domain and the trusted domain failed.

This indicates a communication error between the web-server and the DC, however since our application doesn't at all utilizes Windows authentication, I don't see why it needs to communicate with the DC.

This is my implementation:

[code]...

EDIT:

I was finally enable to reproduce this error on my dev-machine (i revoked my machine from the DC yesterday, but didn't reproduce it until today)

HttpContext.User is actually a WindowsPrincipal by default it seems, and the error in my code was that I only replace it with CustomPrincipal upon login. Hence, unathenticated users still get the WindowsPrincipal which then fails horribly if you have trust issues on your AD.

I tried changing the default principal by invoking this on appstart

AppDomain.CurrentDomain.SetPrincipalPolicy( PrincipalPolicy.NoPrincipal);

But this doesn't seem to kick in. How do I change the default Principal in ASP.NET?

View 1 Replies

C# - Sharepoint Retrieving Username Without Domain Or Programmatically Removing Domain

Aug 16, 2010

Im returning the username from sharepoint site as a string. This is done successfully with the below code but I also get the domain with it. How can I only return the username and not the domain either through sharepoint or programmatically removing it? domain/username

[Code]....

View 3 Replies

Multilingual Dates In Gridview?

Jun 9, 2010

I'm replacing a website that was previously HTML only.

I put a GridView on the French and the English page and I'm getting 2 fields: A date and a currency.

For the date, I need to transform it into a long date format. The English part isn't very hard, but when I get to the French page, I can't transform it into a long date format with French words (i.e.:Mardi instead of Tuesday).

Is there any way to format the string with French date words instead?

View 2 Replies

How To Develop Multilingual Application

Jan 5, 2010

i am so much eager to develop the multilingual application. But i don't know how to start. how to create the application can i know what is the process to create the application. other wise give me a simple example.

View 1 Replies

How To Make Multilingual Website In MVC

Apr 9, 2010

I don't understand where to put the Resources and how can we take the value from that?

View 1 Replies

Ms SQL Insert Multilingual Characters?

Dec 23, 2010

I am trying to create a table in my MS SQL database for Languages. I want to store an English name of Language and a local name of language in the database.

i.e.
Language, Language(local)
English, English
German, Deutsch
Italian, Italiano
Japanese, 日本語
...
...

I have 279 languages that I want to import, but when I import it shows '?????' for some like japanese, Russian and arabic etc. The database Collation is Latin1_General_CI_AS.

I would also like advise on multilingual websites; if i have a database of product descriptions and I want to have translation in multiple languages, should I go for separate databases or Can I have translation in one databse? (I prefer not to duplicate data!). Anything else to make sure users are able to write comments in different languages (char encoding on web?) and can be stored in database.

I have managed to import data but, I cannot select and view correctly and therefore cannot verify if import was successful; I am getting following results on select:

View 2 Replies

Security :: Impersonation With Domain Account Without Joining The Domain?

Sep 28, 2010

My feeling says it's not posible but anyway I am curious if there is at least a workaround for accomplish this.Basically I am working at my client site and my machine is not connected to the domain.What I want to do is running a web application locally under a domain account, and using the webdev server.The webapp uses the default authentication, windows authentication that is.I tried using impersonation with domainuser & password but I got the following error Could not create Windows user token from the credentials specified in the config file. Error from the operating system 'Logon failure: unknown user name or bad password.I have to mention that the username and the password are correct.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved