Esempio n. 1
0
 public LoanCommandHandler(LenderContext context, NotificationContext notification, IEntityValidator entityValidator, IMapper mapper)
 {
     _context         = context;
     _notification    = notification;
     _entityValidator = entityValidator;
     _mapper          = mapper;
 }
Esempio n. 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;
 }
Esempio n. 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();
            }
        }
Esempio n. 4
0
 public FriendQueryHandler(LenderContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }