using System; using System.Collections.Generic; using AvaloniaPractic.Models; using Microsoft.EntityFrameworkCore; namespace AvaloniaApplication2.Models; public partial class AppDbContext : DbContext { public DbSet Users { get; set; } = null!; public DbSet Roles { get; set; } = null!; public DbSet Logineds { get; set; } protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) => optionsBuilder.UseNpgsql("Host=edu.pg.ngknn.local;Port=3128;Database=pavlov41p;Username=31P;Password=12345"); protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity(entity => { entity.HasKey(e => e.Id).HasName("users_pkey"); entity.ToTable("users"); entity.Property(e => e.Id).HasColumnName("id"); entity.Property(e => e.Createdat) .HasDefaultValueSql("CURRENT_TIMESTAMP") .HasColumnType("timestamp without time zone") .HasColumnName("createdat"); entity.Property(e => e.Email) .HasMaxLength(255) .HasColumnName("email"); entity.Property(e => e.Username) .HasMaxLength(100) .HasColumnName("username"); }); OnModelCreatingPartial(modelBuilder); } partial void OnModelCreatingPartial(ModelBuilder modelBuilder); }