Last active
October 24, 2017 06:38
-
-
Save ozgurrgul/6cf822563d611f042427b56ef0e1ed62 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace WebApiJwt.Entities | |
{ | |
public class ApplicationDbContext : IdentityDbContext | |
{ | |
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) | |
{ | |
optionsBuilder.UseMySql(GetConnectionString()); | |
} | |
private static string GetConnectionString() | |
{ | |
const string databaseName = "webapijwt"; | |
const string databaseUser = ""; | |
const string databasePass = ""; | |
return $"Server=localhost;" + | |
$"database={databaseName};" + | |
$"uid={databaseUser};" + | |
$"pwd={databasePass};" + | |
$"pooling=true;"; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment