locked
Request: ADO.NET Entity Data Model RRS feed

  • Question

  • Hi,

    Is there a way to to change the naming 'Pluralize or singularize generate object names'?

    I know it works fine when you write in English, but if you use another language it does not.

    Could it be possible to change the naming convention

    Ex Current.

    Entity 'Country'

    Entity 'State'

    'Country' has a relation to 'State'(0..1 --> *)

    'Country' Navigation Property will be 'States' (Plurailzed) if you select that in Entity Data model wizard' and

    'State' Navigation property will be 'Country'

     

     

    Ex. Request,

    Entity 'Country'

    Entity 'State'

    Country' has a relation to 'State'(0..1 --> *)

    'Country' Navigation Property will be 'cState' c stand for Collection

    'State' Navigation property will be 'oCountry' o stands for Object

     

    I have been doing this name changes to many times now and I really would like to get this automated.

    Working on Customers databases where the database is not written in English gives me a headache every time I have to create or update a Entity model.

     

    I think this will help others alot that don't use English as standard. (I do in general use only English when i write code)

     

    Regards Dsoft

    Tuesday, July 5, 2011 8:25 AM

Answers

  • Hi again Rune

     

     I tried the tool you suggested and it works just as i wanted :)

    This will save me ALOT of time

    Thanks


    DSoft
    • Marked as answer by DSoft Tuesday, July 5, 2011 11:05 AM
    Tuesday, July 5, 2011 11:04 AM

All replies

  • Hi!

    You cannot do this in standard designer tools in VS2010, but Huagati EDMX tools have some support for this that may help you out. Checkout http://www.huagati.com/dbmltools/

    Hope this helps!


    --Rune
    Tuesday, July 5, 2011 8:50 AM
  • Hi,

    Try http://blogs.msdn.com/b/efdesign/archive/2008/12/02/pluralization.aspx

    It seems it should be customizable though I never tried...


    Please always mark whatever response solved your issue so that the thread is properly marked as "Answered".
    Tuesday, July 5, 2011 9:10 AM
  • Thanks,

    I will give both solution a try, yours and Patrice

    DSoft
    Tuesday, July 5, 2011 9:28 AM
  • Thanks Patrice,

     

    I read the article  you sent me and it was great news that it is customizable,

    Regarding the article why doesn't the ADO.NET team use my approach  wouldn't that solution be generic for all languages.


    DSoft
    • Marked as answer by DSoft Tuesday, July 5, 2011 9:38 AM
    • Unmarked as answer by DSoft Tuesday, July 5, 2011 11:06 AM
    Tuesday, July 5, 2011 9:38 AM
  • Hi again Rune

     

     I tried the tool you suggested and it works just as i wanted :)

    This will save me ALOT of time

    Thanks


    DSoft
    • Marked as answer by DSoft Tuesday, July 5, 2011 11:05 AM
    Tuesday, July 5, 2011 11:04 AM