Ejemplo n.º 1
0
 public ClanGetMembershipResult ClanGetMembership(ClanGetMembershipRequest request)
 {
     var clanMembershipDataVersioned = request.Clans
         .Select(c => _clanRepository.FindByIdAsync(c.Id).Result)
         .Where(c => c != null)
         .Select(GetClanMembershipDataVersioned);
     return new ClanGetMembershipResult
     {
         Result = new ServiceResult<List<ClanMembershipDataVersioned>>
         {
             Data = clanMembershipDataVersioned.ToList()
         }
     };
 }
Ejemplo n.º 2
0
 public ClanGetMembershipResult ClanGetMembership(ClanGetMembershipRequest request)
 {
     return new ClanGetMembershipResult
     {
         Result = new ServiceResult<List<ClanMembershipDataVersioned>>
         {
             Data = new List<ClanMembershipDataVersioned>
             {
                 new ClanMembershipDataVersioned
                 {
                     Clan = new ClanId
                     {
                         Id = 1
                     },
                     Version = 0,
                     MembershipData = new ClanMembershipData
                     {
                         Members = new List<ClanMember>
                         {
                             new ClanMember
                             {
                                 Id = new UserId
                                 {
                                     Id = 1
                                 },
                                 ClanRole = 1
                             },
                             new ClanMember
                             {
                                 Id = new UserId
                                 {
                                     Id = 2
                                 },
                                 ClanRole = 0
                             },
                         }
                     }
                 }
             }
         }
     };
 }