public static void AddInDataBase <T>(T[] data, LudothequeAccountContext context) { foreach (var d in data) { context.Add(d); } context.SaveChanges(); }
public static void DropAllData(LudothequeAccountContext context) { context.Games.RemoveRange(context.Games); context.Editors.RemoveRange(context.Editors); context.Difficulties.RemoveRange(context.Difficulties); context.Illustrators.RemoveRange(context.Illustrators); context.MaterialSupport.RemoveRange(context.MaterialSupport); context.Mechanism.RemoveRange(context.Mechanism); context.Theme.RemoveRange(context.Theme); context.SaveChanges(); }