slarny4/Demo1/Data/RemoteData/RemoteDataBase/RemoteDatabaseContext.cs
2024-10-28 15:42:04 +03:00

18 lines
551 B
C#

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");
}
}
}