public ElementService(IMapper Mapper, IMediatorHandler Bus, IMerchantRepository MerchantRepository, IRoleManngeRepository roleManngeRepository) { _Mapper = Mapper; _Bus = Bus; _MerchantRepository = MerchantRepository; _RoleManngeRepository = roleManngeRepository; }
public MustRoleHandle(IAuthenticationSchemeProvider authenticationSchemeProvider, IHttpContextAccessor httpContextAccessor, IRoleManngeRepository roleManngeRepository ) { Schemes = authenticationSchemeProvider; _Accessor = httpContextAccessor; _RoleManngeRepository = roleManngeRepository; }
public UserCommandHandlers(IUnitOfWork uow, IMediatorHandler bus, IUserRepository UserRepository, IRoleManngeRepository RoleManngeRepository, IJwtInterface JwtInterface ) : base(uow, bus) { _Bus = bus; _UserRepository = UserRepository; _RoleManngeRepository = RoleManngeRepository; _JwtInterface = JwtInterface; }
public async static Task <bool> SeedData(IRoleManngeRepository _RoleMannageRepository, IUserRepository _UserRepository) { User user1 = new User(new Guid("9af7f46a-ea52-4aa3-b8c3-9fd484c2af12"), "110101199003076894", "test", "北京市东城区", "13666666666", Encrypt.EncryptPassword("123456"), "*****@*****.**"); if (await _UserRepository.GetModelAsync(x => x.Id.Equals(user1.Id)) != null) { return(false); } RoleMannage roleMannage = new RoleMannage(user1.Id, "Permission", true); await _UserRepository.AddModel(user1); await _RoleMannageRepository.AddModel(roleMannage); return(true); }