I guess you have to add the mapping to fluent NH configuration. In the project Xxx.NHibernate please see the code of XxxDataModule:
Configuration.DefaultNameOrConnectionString = ConfigurationManager.ConnectionStrings["Default"].ConnectionString;
Configuration.Modules.AbpNHibernate().FluentConfiguration
.Database(MsSqlConfiguration.MsSql2008.ConnectionString(Configuration.DefaultNameOrConnectionString))
.Mappings(m => m.FluentMappings.AddFromAssembly(Assembly.GetExecutingAssembly()));
All you need to do is add mapping line pointing to referenced Zero.NHibernate
Hikalkan, Thank you for the framework, and for forcing me to read more in this topic :) Your point of view is "MS way" (like described here: <a class="postlink" href="https://msdn.microsoft.com/en-us/library/ff649585.aspx">https://msdn.microsoft.com/en-us/library/ff649585.aspx</a>), mine is more "pragmatic". For me object is valid or not - only two states. The "Simple Validation" is some gray between black and white. Even if the validation method returns true, you can never be sure if the object is truly valid. Even simpliest models need some more sophisticated validation (like name uniqueness etc.), so almost always validation logic has to be splitted into "simple" and "advanced", without clear border which one is which. For me it's a mess not benefit. Are you sure, it's good design choice?
Hi I have db table which doesnot allow duplication of some column (ie. Name has to be unique). It seems, that current validation model can't handle this scenario well. I have created DTO with dependency on IMyRepository, but it hasn't been resolved. For now I decided to force DI using Abp.Dependency.IocManager.Instance.Resolve<IMyRepository>() but I don't like it. My proposition is to remove Validation feature from DTO and move it to external validation class, then inject. This gives a lot more flexibility in validation. Good validator :