using Microsoft.EntityFrameworkCore; using Newtonsoft.Json; using System.ComponentModel.DataAnnotations.Schema; namespace Server.SQL { [Table("equipment", Schema = "gamedb")] public class Equipment { public long id { get; set; } [JsonIgnore] public long user_id { get; set; } public long equip_unit { get; set; } public int rand_stats { get; set; } public long equipment_data_id { get; set; } } public class EquipmentrSQL : SQL { public override DbSet table { get; set; } public void Update(Equipment equipment) { table.Update(equipment); } public override List SelectUid(long user_id) { return table.Where(data => data.user_id == user_id).ToList(); } public Equipment SelectItem(long user_id, long equipment_id) { return table.FirstOrDefault(data => (data.user_id == user_id) && (data.id == equipment_id)); } } }