Advertisement
Guest User

Untitled

a guest
Mar 24th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. using System;
  2. using Microsoft.EntityFrameworkCore;
  3.  
  4. namespace CoreAPI.Models
  5. {
  6. public class DatabaseContext : DbContext
  7. {
  8. protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
  9. => optionsBuilder.UseNpgsql("Host=localhost;Database=CoreAPIDb;Username=postgres;Password=1273");
  10.  
  11. public DbSet<Author> Authors { get; set; }
  12. public DbSet<Book> Books { get; set; }
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement