예제 #1
0
 public LoanCommandHandler(LenderContext context, NotificationContext notification, IEntityValidator entityValidator, IMapper mapper)
 {
     _context         = context;
     _notification    = notification;
     _entityValidator = entityValidator;
     _mapper          = mapper;
 }
예제 #2
0
 public GameCommandHandler(LenderContext context,
                           UserManager <AppUser> userManager,
                           IPhotoAccessor photoAccesor,
                           IEntityValidator entityValidator,
                           NotificationContext notification, IMapper mapper)
 {
     _context         = context;
     _userManager     = userManager;
     _photoAccesor    = photoAccesor;
     _entityValidator = entityValidator;
     _notification    = notification;
     _mapper          = mapper;
 }
예제 #3
0
        public static async Task SeedData(LenderContext context, UserManager <AppUser> userManager)
        {
            if (!userManager.Users.Any())
            {
                var users = new List <AppUser>
                {
                    new AppUser
                    {
                        Id       = Guid.NewGuid().ToString(),
                        UserName = "******",
                        Email    = "*****@*****.**"
                    }
                };

                foreach (var user in users)
                {
                    await userManager.CreateAsync(user, "P@ssw0rd123");
                }
                await context.SaveChangesAsync();
            }
        }
예제 #4
0
 public FriendQueryHandler(LenderContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }