summaryrefslogtreecommitdiff
path: root/Models/LibraryContext.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Models/LibraryContext.cs')
-rw-r--r--Models/LibraryContext.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/Models/LibraryContext.cs b/Models/LibraryContext.cs
new file mode 100644
index 0000000..114ce2c
--- /dev/null
+++ b/Models/LibraryContext.cs
@@ -0,0 +1,10 @@
+using Microsoft.EntityFrameworkCore;
+
+namespace LibraryAPI.Models {
+ public class LibraryContext : DbContext {
+ public DbSet<Book>? Books { get; set; }
+ public LibraryContext(DbContextOptions<LibraryContext> options) : base(options) {}
+ //protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
+ // => optionsBuilder.UseNpgsql("Host=127.0.0.1;Database=library;Username=luis");
+ }
+} \ No newline at end of file