1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
using Microsoft.EntityFrameworkCore; namespace HyperBooru; [Index(nameof(Username))] public class User : HBObject { public string Username { get; set; } public string PasswordHash { get; set; } public static explicit operator ApiModels.User(User user) => new() { UserId = user.Guid, Username = user.Username }; }