Base solution for your next web application

Activities of "nidhisharma"

Thanks, It worked.

The mistake was this code:

/* NOTE: This constructor is used by ABP to pass connection string */ public Con2DbContext(string nameOrConnectionString) : base(nameOrConnectionString) { } When I removed this line after seeing your code...it worked.

Thanks again.

How to add another dbcontext in the the application? The steps I followed:

  1. I have added a new connectionstring in the config file with name='con2'.

  2. Created dbcontext similar to existing one inheriting AbpDbContext and passed connection string name here in constructor public Con2Context() : base("con2") {

     }
    
  3. But Preinitialize() method calls only con1. Configuration.DefaultNameOrConnectionString = "con1";

where do I configure con2 connnection? Right now, it is ignoring con2 and using con1 only for Con2Context. Please help!

Showing 1 to 2 of 2 entries