slarny4/Demo1/Data/RemoteData/RemoteDataBase/RemoteDatabaseContext.cs

18 lines
551 B
C#
Raw Normal View History

2024-10-28 12:42:04 +00:00
using Demo.Data.LocalData.Entity;
using Microsoft.EntityFrameworkCore;
public class RemoteDatabaseContext : DbContext
{
public DbSet<User> Users { get; set; }
public RemoteDatabaseContext(DbContextOptions<RemoteDatabaseContext> options) : base(options) { }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (!optionsBuilder.IsConfigured)
{
optionsBuilder.UseNpgsql("Host=45.67.56.214;Port=5421;Database=PresenceDB;Username=user5;Password=EtEJqhsf");
}
}
}