Base solution for your next web application

Activities of "antcandal"

I have a very weird error. I create a standard test class with AbpIntegratedTestBaselike base :

**public class BaseTestBorradores : AbpIntegratedTestBase { protected BaseTestBorradores() {

    }

    #region ImplementacionesBase
    protected override void PreInitialize()
    {
        LocalIocManager.IocContainer.AddFacility<LoggingFacility>(f => f.UseLog4Net().WithAppConfig());
        base.PreInitialize();
    }

    protected override void AddModules(Abp.Collections.ITypeList<Abp.Modules.AbpModule> modules)
    {
        base.AddModules(modules);
        modules.Add<ComisionVirtualApplicationModule>();
    }

    public override void Dispose()
    {
        base.Dispose();
    }
    #endregion
}**

And a class with a test using It :

**public class TestBorradores : BaseTestBorradores { protected IAsuntosService _AsuntosService;

    public TestBorradores()
    {
        _AsuntosService = LocalIocManager.IocContainer.Resolve<IAsuntosService>();
    }

    #region Test
    [Fact]
    public int Altasaunto()
    {
        int id = 0;
        id.ShouldBe(0);
        return id;
    }
    #endregion
}**

The problem is when the i try to resolve the AsuntosService Dependency and the service itself calls inside IocContainer to manually resolve any dependency. The test create one IocContainer ComisionVirtual.IntegrationTest 2 (with the dependencies well resolved) and the application Services use another IocContainer ComisionVirtual.IntegrationTest 1, with causes the app to fail when try to resolve the first direct Call to IocContainer.

Question

I have the data model with some database tables with the key column not naming Id or ID. For example ClientId, being autoincrement identity. Have I to change all the key fields to Id or ID? with other names persisting throws error

Question

What is the best aproach in BoilerPlate for deal with config values? Store it in web.config (web app) an app.config and pass through modules?

Regards

Showing 1 to 3 of 3 entries