public static List <Attack> getListOfAttacks() { using (CardContext context = new CardContext()) { return(context.Attacks.ToList()); } }
public static List <CardType> getListOfCardTypes() { using (CardContext context = new CardContext()) { return(context.CardTypes.ToList()); } }
public static void MigrateDatabase() { using (CardContext context = new CardContext()) { if (context.Database.EnsureCreated()) { context.Database.Migrate(); } } }