From 0bcbc7f4721830a1a65fbd2e30fbb69f803884c2 Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Thu, 15 Sep 2022 16:52:16 -0500 Subject: AƱadir base de datos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Models/LibraryContext.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Models/LibraryContext.cs (limited to 'Models/LibraryContext.cs') 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? Books { get; set; } + public LibraryContext(DbContextOptions 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 -- cgit v1.2.3