Base solution for your next web application

Activities of "byteplatz"

Thanks Halil,

I will implemente like that !

Regards

Bruno

The first idea that came up was create a shared interface for example ICreatePermissionsForDefaultTenant and use main app DefaultTenantRoleAndUserCreator seed to execute the code from several modules.

The same apply for menus created by the separated module...And I thinkg other things will benefit for the given approach as well. Thus, main app does not know about the service module but still can add permissions, menus and such into the database.

Bruno

Great. I was going pretty much the same thought.

I will try something like that in near future.

Bruno Bertechini

Thank you very much. It worked like a charm.

I did the following:

  • Main App upgraded to 1.6 (clean install - localization db working)
  • Custom Module in separate solution containing default projects (core, app, web, entityframework)
  • Custom Module Web Core Project CoreModule with:
public override void PreInitialize()
        {
            //Add/remove localization sources
            Configuration.Localization.Sources.Add(
                new DictionaryBasedLocalizationSource(
                    MyModuleConsts.LocalizationSourceName,
                    new XmlEmbeddedFileLocalizationDictionaryProvider(
                        Assembly.GetExecutingAssembly(),
                        MyModuleConsts.LocalizationSourceRootNameSpace
                        )
                    )
                );
        }

And the localization is working out of the box...

For another module (separated solution as well, I didnt have to change anything)

Well done !!!

Amazing job on these smooth upgrades!

Regards

Bruno Bertechini

Thank you very much

I will code accordingly and get back to you

Bruno

Ok thanks.

Do I need to add this code to PreInitialize for each custom module ? Or only in App (since I am using a separated solution for each module)

//Use database as language management
            Configuration.Modules.Zero().LanguageManagement.EnableDbLocalization();

Cheers

Bruno

I can see that WebModule has a new config line :

Configuration.Modules.Zero().LanguageManagement.EnableDbLocalization();

Bottomline I just need that line at my custom module core Project module and remove this

//Add/remove localization sources
            Configuration.Localization.Sources.Add(
                new DictionaryBasedLocalizationSource(
                    CardStockConsts.LocalizationSourceName,
                    new XmlEmbeddedFileLocalizationDictionaryProvider(
                        Assembly.GetExecutingAssembly(),
                        CardStockConsts.LocalizationSourceRootNameSpace
                        )
                    )
                );

Is that enough or do I need to do something else ?

Bruno

Thank you very much

Bruno

+1 for the suggested approach.

We used to have same Scenario, and we end up creating code-first like classes and entities by adapting then as we go...

Regards

Bruno Bertechini

Thanks for the reply.

I understand and I agree with you on cliente side/menu approach.

I was just wondering if this is by design or something missing.

I ask because I am following documentation and testing/understanding between each and every step...

Thanks a lot

Bruno

Showing 31 to 40 of 40 entries