Giter Site home page Giter Site logo

Comments (3)

Ahoo-Wang avatar Ahoo-Wang commented on May 18, 2024
    <Statement Id="Query_ReadDb2"  ReadDb="ReadDb-2">
      Select Top 10 T.* From T_Entity T
    </Statement>
            var result = _sqlMapper.Query<T_Entity>(new RequestContext
            {
                Scope = Scope,
                SqlId = "Query_ReadDb2"
            });

from smartsql.

ghd258 avatar ghd258 commented on May 18, 2024

<Statement Id="WriteDb2" ReadDb="WriteDb-2"> Select Top 10 T.* From T_Entity T </Statement>
这里可以支持配置写数据库连接多个吗,如果只能是配置读库,那么如果业务系统要按照不同的业务分为多个库的情况下还有多个数据库的,就有多个写库了,当然多个数据也可以用多个仓储实现,但是仓储比较麻烦,没有这个方便

from smartsql.

Ahoo-Wang avatar Ahoo-Wang commented on May 18, 2024

不可以的,最多只能支持到这个场景。可以指定WriteDb的话就违反SmartSql的规范了。
通过多SmartSqlMapper实例来做吧,这样也有利于你拆分业务。
https://github.com/Ahoo-Wang/SmartSql/releases/tag/v3.6.4

from smartsql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.