I have a project structure like
MySolution -FrontEnd -webforms -console -Mvc -Repositories -Dapper (Class library) -Tests
How to reference the connection string in my repository class library? I tried to add App.Config to my class library project, but it is not available in Add New Elements. I am using Visual Studio 2013 Express for the web. Thanks Damien.
.Config, which applies to libraries, is an execution assembly using these libraries, so you do not need to add App.Config to your project, it will use the App or Web.Config of your startup project.
ConfigurationManager, System.Configuration .
ConfigurationManager
System.Configuration
web.config FrontEnd. app.config .
, web.config.
http://www.connectionstrings.com/store-connection-string-in-webconfig/
Source: https://habr.com/ru/post/1523850/More articles:Sending GL Uniforms: Multiple floats versus vector packaging - shaderCatch event deletion in View in Backbone js - backbone.jsУстройства WiFi передают пакеты, когда они только что включены? - smartphoneChi-square test with two samples in R - rCheck System.DateTime in UTC - timezoneShould the connection string come from an mvc project or data project? - asp.net-mvcThe $ rootcope value used in the controller is overridden when refreshing the page used with this controller - angularjsefficient storage of chess position - databaseORA-01036: недопустимое имя/номер переменной при запуске запроса через С# - c#will java use more memory when working on a machine with more RAM - javaAll Articles