Guest User

Untitled

a guest
Oct 24th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. namespace WebApiJwt.Entities
  2. {
  3. public class ApplicationDbContext : IdentityDbContext
  4. {
  5. protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
  6. {
  7. optionsBuilder.UseMySql(GetConnectionString());
  8. }
  9.  
  10. private static string GetConnectionString()
  11. {
  12. const string databaseName = "webapijwt";
  13. const string databaseUser = "";
  14. const string databasePass = "";
  15.  
  16. return $"Server=localhost;" +
  17. $"database={databaseName};" +
  18. $"uid={databaseUser};" +
  19. $"pwd={databasePass};" +
  20. $"pooling=true;";
  21. }
  22. }
  23. }
Add Comment
Please, Sign In to add comment