Advertisement
Guest User

Untitled

a guest
May 20th, 2018
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.70 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5.  
  6. namespace projektas.Controllers.DB
  7. {
  8.     public class MySqlConfig
  9.     {
  10.         private string host = "localhost";
  11.         private string dbName = "build_pc";
  12.         private string userName = "root";
  13.         private string password = "";
  14.         private string connectionString = "";
  15.  
  16.         public MySqlConfig()
  17.         {
  18.             this.connectionString = String.Format("server={0};user id={1};password={2};persistsecurityinfo=True;database={3};SslMode=none", host, userName, password, dbName);
  19.         }
  20.  
  21.         public String getConfig()
  22.         {
  23.             return connectionString;
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement