public static void AddServiceCollectionDAL(this IServiceCollection services)
        {
            services.AddScoped <IQTeamForm_DAL, QTeamForm_DAL>();
            QTeamContext context;

            DbInitializer.Initialize(context = new QTeamContext());
        }
Exemplo n.º 2
0
 public static void Initialize(QTeamContext qTeamContext)
 {
     qTeamContext.Database.EnsureCreated();
     qTeamContext.SaveChanges();
 }