ioc.config 946 B

12345678910111213141516171819
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <unity>
  3. <typeAliases>
  4. <typeAlias alias="IDatabase" type="LeaRun.Data.IDatabase,LeaRun.Data" />
  5. <typeAlias alias="EFDatabase" type="LeaRun.Data.EF.Database,LeaRun.Data.EF" />
  6. <typeAlias alias="IDbContext" type="LeaRun.Data.EF.IDbContext,LeaRun.Data.EF" />
  7. <!--<typeAlias alias="MySql" type="LeaRun.Data.EF.MySqlDbContext,LeaRun.Data.EF" />-->
  8. <typeAlias alias="SqlServer" type="LeaRun.Data.EF.SqlServerDbContext,LeaRun.Data.EF" />
  9. </typeAliases>
  10. <containers>
  11. <container name="DBcontainer">
  12. <type type="IDatabase" mapTo="EFDatabase" ></type >
  13. <!-- 默认数据库软件类型:SqlServer,MySql,Oracle,Access,SQLite-->
  14. <type type="IDbContext" mapTo="SqlServer" ></type >
  15. <type type="IDbContext" mapTo="SqlServer" name="SqlServer"></type >
  16. <!--<type type="IDbContext" mapTo="MySql" name="MySql"></type >-->
  17. </container>
  18. </containers>
  19. </unity>