コード例 #1
0
 public UpdatePersonalDataCommandHandler(
     IContactAggregateRepository contactAggregateRepository
     , Func <UserManager <ApplicationUser> > userManager
     , IOptions <AuthorizationOptions> securityOptions
     )
     : base(userManager, securityOptions)
 {
     _contactAggregateRepository = contactAggregateRepository;
 }
コード例 #2
0
        public UserType(IContactAggregateRepository contactAggregateRepository)
        {
            Field(x => x.AccessFailedCount);
            Field(x => x.CreatedBy, true);
            Field(x => x.CreatedDate, true);
            Field(x => x.Email, true);
            Field(x => x.EmailConfirmed);
            Field(x => x.Id);
            Field(x => x.IsAdministrator);
            Field(x => x.LockoutEnabled);
            Field <DateTimeGraphType>("lockoutEnd", resolve: x => x.Source.LockoutEnd);
            Field(x => x.MemberId, true);
            Field(x => x.ModifiedBy, true);
            Field(x => x.ModifiedDate, true);
            Field(x => x.NormalizedEmail, true);
            Field(x => x.NormalizedUserName, true);
            Field(x => x.PasswordExpired);
            Field(x => x.PhoneNumber, true);
            Field(x => x.PhoneNumberConfirmed);
            Field(x => x.PhotoUrl, true);
            Field <ListGraphType <RoleType> >("roles", resolve: x => x.Source.Roles);
            Field <ListGraphType <StringGraphType> >("permissions", resolve: x => x.Source.Roles?.SelectMany(r => r.Permissions?.Select(p => p.Name)));
            Field(x => x.SecurityStamp);
            Field(x => x.StoreId, true);
            Field(x => x.TwoFactorEnabled);
            Field(x => x.UserName);
            Field(x => x.UserType, true);

            AddField(new FieldType
            {
                Name        = "Contact",
                Description = "The associated contact info",
                Type        = GraphTypeExtenstionHelper.GetActualType <ContactType>(),
                Resolver    = new AsyncFieldResolver <ApplicationUser, ContactAggregate>(context =>
                                                                                         contactAggregateRepository.GetContactByIdAsync(context.Source.MemberId))
            });
        }
コード例 #3
0
 public UpdateContactAddressesCommandHandler(IContactAggregateRepository contactAggregateRepository)
 {
     _contactAggregateRepository = contactAggregateRepository;
 }
 public DeleteContactCommandHandler(IContactAggregateRepository contactAggregateRepository)
 {
     _contactAggregateRepository = contactAggregateRepository;
 }
コード例 #5
0
 public GetContactByIdQueryHandler(IContactAggregateRepository contactAggregateRepository)
 {
     _contactAggregateRepository = contactAggregateRepository;
 }