We have recently released MonoX v5.1. It brought major infrastructural changes related to module, service (BLL) and repository IoC/DI (Inversion of Control/Dependency Injection). These major changes introduced new BLL, repository and various other classes which must be used in order for v5.1 and above to work properly. There are also a few breaking changes that needs to be fixed in order to safely upgrade your application.
Here is how you should upgrade your existing MonoX installation.
- SilverlightUploadModule has been replaced with HTML5Upload site-wide. This is a drop-in replacement, only the markup was changed. SilverlightUploadModule will still work if you use it elsewhere.
- MonoX DAL is upgraded to LLBLGen version 4.1. The latest package is available on GitHub.
- Here are new configuration sections that need to be added: <section name="sqlServerCatalogNameOverwrites" type="System.Configuration.NameValueSectionHandler"/>
- sqlServerCatalogNameOverwrites configuration: <sqlServerCatalogNameOverwrites><add key="*" value="" /></sqlServerCatalogNameOverwrites>
- Change the "MonoSoftware.MonoX.Blog.Gravatar.GravatarType.Avatar" to "MonoSoftware.MonoX.Blog.GravatarType.Avatar"
- Change ParentEntityType="<%$ Code: MonoSoftware.MonoX.Utilities.SnEntityType.Message %>" to ParentEntityType="<%$ Code: Convert.ToInt32(MonoSoftware.MonoX.Utilities.SnEntityType.Message) %>"
- Required code changes related to DI Ninject container (Note: All repositories now have an interface through which they are resolved.)
- Naming changes
Old pattern for repository calls:
New pattern for repository calls:
- if DependencyInjectionFactory is not available you will have to use ResolveWithoutContext DIFactory.ResolveWithoutContext<IRepositoryNameRepository>().MethodName();
- It's preferred to use BLL interface instead of calling repository directly in all Pages, WebControls and UserControls. All methods available in the repository should be reflected in the BLL.
- Here is a sample code illustrating the usage of BLL:
EntityCollection<BlogEntity> blogs = BlogRepository.GetInstance().GetBlogs(e.Text, 50);
EntityCollection<BlogEntity> blogs = DependencyInjectionFactory.Resolve<IBlogBLL>().GetBlogs(e.Text, 50);
If you have any issues while upgrading, you should report them to our support forum.
Please send your feedback and feature requests to our Roadmap forum.