.NET 10 solution for Ping, a Discord style chat app: Domain, Application and Infrastructure projects plus the Api host. SignalR for chat and presence, LiveKit for call tokens, EF Core on Postgres, S3 compatible storage for attachments, and OIDC auth shared with the Musify Zitadel instance. Includes the Compose stack for local development.
29 lines
724 B
C#
29 lines
724 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using Ping.Domain.Entities;
|
|
|
|
namespace Ping.Application.Contracts
|
|
{
|
|
public interface IDatabase
|
|
{
|
|
DbSet<User> Users { get; }
|
|
|
|
DbSet<Friendship> Friendships { get; }
|
|
|
|
DbSet<Server> Servers { get; }
|
|
|
|
DbSet<ServerMember> ServerMembers { get; }
|
|
|
|
DbSet<Channel> Channels { get; }
|
|
|
|
DbSet<ChannelMember> ChannelMembers { get; }
|
|
|
|
DbSet<Message> Messages { get; }
|
|
|
|
DbSet<Attachment> Attachments { get; }
|
|
|
|
Task<IDatabaseTransaction> BeginTransactionAsync(System.Data.IsolationLevel isolationLevel, CancellationToken cancellationToken);
|
|
|
|
Task<int> SaveChangesAsync(CancellationToken cancellationToken);
|
|
}
|
|
}
|