public MyProfileServices( SimpleSocialContext dbContext, IMapper mapper) { this.dbContext = dbContext; this.mapper = mapper; }
public FollowersServices( UserManager <SimpleSocialUser> userManager, SimpleSocialContext dbContext) { this.userManager = userManager; this.dbContext = dbContext; }
public async Task SeedAsync(SimpleSocialContext dbContext, IServiceProvider serviceProvider) { if (dbContext == null) { throw new ArgumentNullException(nameof(dbContext)); } if (serviceProvider == null) { throw new ArgumentNullException(nameof(serviceProvider)); } var logger = serviceProvider.GetService <ILoggerFactory>().CreateLogger(typeof(ApplicationDbContextSeeder)); var seeders = new List <ISeeder> { new RolesSeeder(), }; foreach (var seeder in seeders) { await seeder.SeedAsync(dbContext, serviceProvider); await dbContext.SaveChangesAsync(); logger.LogInformation($"Seeder {seeder.GetType().Name} done."); } }
public AdministrationServices( IMapper mapper, UserManager <SimpleSocialUser> userManager, SimpleSocialContext dbContext) { this.mapper = mapper; this.userManager = userManager; this.dbContext = dbContext; }
public PostServicesTests() { var guid = new Guid().ToString(); var options = new DbContextOptionsBuilder <SimpleSocialContext>() .UseInMemoryDatabase(databaseName: guid) // Give a Unique name to the DB .Options; this.dbContext = new SimpleSocialContext(options); }
public SearchServices( IFollowersServices followersServices, UserManager <SimpleSocialUser> userManager, SimpleSocialContext dbContext) { this.followersServices = followersServices; this.userManager = userManager; this.dbContext = dbContext; }
public async Task SeedAsync(SimpleSocialContext dbContext, IServiceProvider serviceProvider) { var roleManager = serviceProvider.GetRequiredService <RoleManager <ApplicationRole> >(); var userManager = serviceProvider.GetRequiredService <UserManager <SimpleSocialUser> >(); await SeedRoleAsync(roleManager, AdminConstants.AdminRoleName); await SeedRoleAsync(roleManager, GlobalConstants.NormalUserRoleName); await SeedAdminUserAsync(userManager); }
public ProfilePictureService( SimpleSocialContext dbContext, IConfiguration configuration, IUserServices userServices ) { this.dbContext = dbContext; this.configuration = configuration; this.userServices = userServices; }
public ProfilePictureService( SimpleSocialContext dbContext, UserManager <SimpleSocialUser> userManager, IConfiguration configuration ) { this.dbContext = dbContext; this.userManager = userManager; this.configuration = configuration; }
public IndexModel( UserManager <SimpleSocialUser> userManager, SignInManager <SimpleSocialUser> signInManager, IProfileDetailsServices profileDetailsServices, SimpleSocialContext dbContext) { _userManager = userManager; _signInManager = signInManager; this.profileDetailsServices = profileDetailsServices; this.dbContext = dbContext; }
public ReportsService( IPostServices postServices, IFollowersServices followersServices, SimpleSocialContext dbContext, UserManager <SimpleSocialUser> userManager) { this.postServices = postServices; this.followersServices = followersServices; this.dbContext = dbContext; this.userManager = userManager; }
public RegisterModel( UserManager <SimpleSocialUser> userManager, SignInManager <SimpleSocialUser> signInManager, ILogger <RegisterModel> logger, SimpleSocialContext dbContext) { _userManager = userManager; _signInManager = signInManager; _logger = logger; this.dbContext = dbContext; }
public UserServices( SimpleSocialContext dbContext, IMapper mapper, IFollowersServices followersServices, UserManager <SimpleSocialUser> userManager) { this.dbContext = dbContext; this.mapper = mapper; this.followersServices = followersServices; this.userManager = userManager; }
public UserServices( SimpleSocialContext dbContext, IMapper mapper, IFollowersServices followersServices, IProfilePictureService profilePictureService, UserManager <SimpleSocialUser> userManager) { this.dbContext = dbContext; this.mapper = mapper; this.followersServices = followersServices; this.profilePictureService = profilePictureService; this.userManager = userManager; }
public BaseServiceInitializer() { lock (thisLock) { Mapper.Reset(); Mapper.Initialize(x => { x.AddProfile <SimpleSocialProfile>(); }); } var services = SetServices(); this.Provider = services.BuildServiceProvider(); this.Context = this.Provider.GetRequiredService <SimpleSocialContext>(); SetScoppedServiceProvider(); }
public PostServices( IRepository <Post> postRepository, IRepository <UserLike> userLikesRepository, IRepository <SimpleSocialUser> userRepository, IRepository <UserFollower> userFollowersRepository, IRepository <PostReport> reportsRepository, UserManager <SimpleSocialUser> userManager, SimpleSocialContext dbContext, IMapper mapper ) { this.postRepository = postRepository; this.userLikesRepository = userLikesRepository; this.userRepository = userRepository; this.userFollowersRepository = userFollowersRepository; this.reportsRepository = reportsRepository; this.userManager = userManager; this.dbContext = dbContext; this.mapper = mapper; }
public CommentsServices(SimpleSocialContext dbContext, IMapper mapper) { this.dbContext = dbContext; this.mapper = mapper; }
public LikesServices(SimpleSocialContext dbContext) { this.dbContext = dbContext; }