Example #1
0
        public void Configure(IApplicationBuilder app,
                              IHostingEnvironment env,
                              SocialHeroesContext context,
                              UserManager <User> userManager,
                              RoleManager <Role> roleManager)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            // Criação de estruturas, usuários e permissões
            // na base do ASP.NET Identity Core (caso ainda não
            // existam)
            //new IdentityInitializerConfiguration(context, userManager, roleManager)
            //    .Initialize();

            app.UseAuthentication();
            app.UseCors(c =>
            {
                c.AllowAnyHeader();
                c.AllowAnyMethod();
                c.AllowAnyOrigin();
            });

            app.UseMvc();
            app.UseStaticFiles();
            app.UseResponseCompression();
            app.UseSwagger();
            app.UseSwaggerUI(s =>
            {
                s.SwaggerEndpoint("/swagger/v1/swagger.json", "Social Heroes Project API v1.0");
            });
        }
 public IdentityInitializerConfiguration(
     SocialHeroesContext context,
     UserManager <User> userManager,
     RoleManager <Role> roleManager)
 {
     _context     = context;
     _userManager = userManager;
     _roleManager = roleManager;
 }
Example #3
0
 public BreastMilkNotificationRepository(SocialHeroesContext context) : base(context)
 {
 }
Example #4
0
 public AddressRepository(SocialHeroesContext context) : base(context)
 {
 }
 public BloodRepository(SocialHeroesContext context)
     : base(context)
 {
 }
 public HairNotificationRepository(SocialHeroesContext context) : base(context)
 {
 }
 public Repository(SocialHeroesContext context)
 {
     Db    = context;
     DbSet = Db.Set <TEntity>();
 }
 public PhoneRepository(SocialHeroesContext context) : base(context)
 {
 }
Example #9
0
 public HairRepository(SocialHeroesContext context)
     : base(context)
 {
 }
 public InstitutionUserRepository(SocialHeroesContext context) : base(context)
 {
 }
 public DonatorUserRepository(SocialHeroesContext context) : base(context)
 {
 }
Example #12
0
 public UserSocialNotificationTypeRepository(SocialHeroesContext context) : base(context)
 {
 }
 public DonatorUserBloodNotificationRepository(SocialHeroesContext context) : base(context)
 {
 }
Example #14
0
 public UnitOfWork(SocialHeroesContext context)
 {
     _context = context;
 }