Click here to Skip to main content
15,921,837 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: Entity Framework Code First is generating an extra column - need some help please Pin
Uranium-2359-Mar-20 14:13
Uranium-2359-Mar-20 14:13 
AnswerRe: Entity Framework Code First is generating an extra column - need some help please Pin
Richard Deeming10-Mar-20 0:55
mveRichard Deeming10-Mar-20 0:55 
QuestionBest way to remotely send/retrieve data (securely) Pin
Uranium-2357-Mar-20 15:03
Uranium-2357-Mar-20 15:03 
AnswerRe: Best way to remotely send/retrieve data (securely) Pin
Gerry Schmitz8-Mar-20 10:05
mveGerry Schmitz8-Mar-20 10:05 
GeneralRe: Best way to remotely send/retrieve data (securely) Pin
Uranium-2358-Mar-20 19:41
Uranium-2358-Mar-20 19:41 
QuestionSending email via .net core 3 using Worker Service Pin
ElenaRez25-Feb-20 4:00
ElenaRez25-Feb-20 4:00 
AnswerRe: Sending email via .net core 3 using Worker Service Pin
ZurdoDev25-Feb-20 4:25
professionalZurdoDev25-Feb-20 4:25 
SuggestionRe: Sending email via .net core 3 using Worker Service Pin
Richard MacCutchan25-Feb-20 4:27
mveRichard MacCutchan25-Feb-20 4:27 
SuggestionRe: Sending email via .net core 3 using Worker Service Pin
Richard Deeming25-Feb-20 4:55
mveRichard Deeming25-Feb-20 4:55 
QuestionProblems with EntityFramwork - compatible Framework Database Driver not found?! Pin
ricardo188515-Feb-20 9:33
ricardo188515-Feb-20 9:33 
AnswerRe: Problems with EntityFramwork - compatible Framework Database Driver not found?! Pin
Gerry Schmitz15-Feb-20 9:52
mveGerry Schmitz15-Feb-20 9:52 
QuestionClosing and Disposing Excel Application Process in C# Pin
Pramod_Kumar14-Feb-20 4:26
Pramod_Kumar14-Feb-20 4:26 
AnswerRe: Closing and Disposing Excel Application Process in C# Pin
Richard Deeming4-Feb-20 4:37
mveRichard Deeming4-Feb-20 4:37 
Questionconverting text file data from string to X,Y,Z coordinates Pin
Sher Shah 11-Feb-20 3:32
Sher Shah 11-Feb-20 3:32 
AnswerRe: converting text file data from string to X,Y,Z coordinates Pin
Pete O'Hanlon1-Feb-20 4:10
mvePete O'Hanlon1-Feb-20 4:10 
GeneralRe: converting text file data from string to X,Y,Z coordinates Pin
Sher Shah 11-Feb-20 5:11
Sher Shah 11-Feb-20 5:11 
GeneralRe: converting text file data from string to X,Y,Z coordinates Pin
phil.o1-Feb-20 6:28
professionalphil.o1-Feb-20 6:28 
QuestionApplication wide information into classes in referenced DLL's Pin
A D Rosser28-Jan-20 4:22
A D Rosser28-Jan-20 4:22 
AnswerRe: Application wide information into classes in referenced DLL's Pin
Richard Deeming28-Jan-20 4:32
mveRichard Deeming28-Jan-20 4:32 
Store the connection string in the application's configuration file, and have the "functionality" class read it from there.

Eg:
XML
<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <connectionStrings>
        <add
            name="Functionality"
            connectionString="........."
            providerName="System.Data.SqlClient"
        />
    </connectionStrings>
</configuration>
VB.NET
Private Shared Function CreateConnection() As SqlConnection
    Dim connectionString As String = ConfigurationManager.ConnectionStrings("Functionality").ConnectionString
    Return New SqlConnection(connectionString)
End Function
If you need to access more than one database in a single application, you'll need to modify your classes so that you can pass in the connection string name somehow. You can still read the actual connection string from the configuration file.



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

GeneralRe: Application wide information into classes in referenced DLL's Pin
A D Rosser29-Jan-20 5:04
A D Rosser29-Jan-20 5:04 
AnswerRe: Application wide information into classes in referenced DLL's Pin
Gerry Schmitz28-Jan-20 4:40
mveGerry Schmitz28-Jan-20 4:40 
GeneralRe: Application wide information into classes in referenced DLL's Pin
A D Rosser29-Jan-20 5:13
A D Rosser29-Jan-20 5:13 
GeneralRe: Application wide information into classes in referenced DLL's Pin
Eddy Vluggen29-Jan-20 6:48
professionalEddy Vluggen29-Jan-20 6:48 
GeneralRe: Application wide information into classes in referenced DLL's Pin
watchmeoni9-Mar-20 14:18
watchmeoni9-Mar-20 14:18 
AnswerRe: Application wide information into classes in referenced DLL's Pin
Mycroft Holmes28-Jan-20 10:13
professionalMycroft Holmes28-Jan-20 10:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.