Mybatis.NET Web Application Config

159 views
Skip to first unread message

KWK

unread,
Jan 24, 2014, 6:41:03 AM1/24/14
to mybatis...@googlegroups.com
Hi guys,
I'm a newbie in .NET and myBatis.NET, but advanced user in myBatis.Java.

I need to develop .NET Web application using myBatis as data access layer.
Could you tell me what is right way to declare database connection.
May I use datasource resources declared in Web.config file? (For example)
  <connectionStrings>
    <add name="DefaultConnection" connectionString="..." />
  </connectionStrings>

Or I need to declare an independent resource in SQLMap without linking to declared resource in Web.config?


Michael McCurrey

unread,
Jan 24, 2014, 8:12:22 AM1/24/14
to mybatis...@googlegroups.com
I don't' use the connectionStrings hardcoded in the Web.Config.  You can put the connection string in your SqlMap.config or you can inject it with properties.


--
You received this message because you are subscribed to the Google Groups "mybatisnet-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mybatisnet-us...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Michael J. McCurrey
Read with me at http://www.mccurrey.com
http://chaoticmindramblings.blogspot.com/

KWK

unread,
Jan 27, 2014, 8:44:31 AM1/27/14
to mybatis...@googlegroups.com, mic...@mccurrey.com
But do you think this it is properly if one part of application allocates some connections in pool declared in Web.config and other part of application (using mybatis) allocates some other connection in pool declared in SqlMap.config 

пятница, 24 января 2014 г., 17:12:22 UTC+4 пользователь Michael McCurrey написал:
I don't' use the connectionStrings hardcoded in the Web.Config.  You can put the connection string in your SqlMap.config or you can inject it with properties.
Reply all
Reply to author
Forward
0 new messages