Beispiel #1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, AviTrackrDbContext context)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
                app.UseCors("dev");
            }

            Mapper.Initialize(i => i.AddProfiles(typeof(BaseEntity).GetTypeInfo().Assembly));

            UserProfileSeed.Seed(context).Wait();
            NotificationTypeSeed.Seed(context).Wait();
            MyTaskStatusesSeed.Seed(context).Wait();

            app.UseAuthentication();
            app.UseMvc();
        }
Beispiel #2
0
    public void Configure(EntityTypeBuilder <UserProfile> builder)
    {
        builder.ToTable("UserProfile");

        builder.HasData(UserProfileSeed.Data());
    }