コード例 #1
0
 public ClanGetBaseDataResult ClanGetBaseData(ClanGetBaseDataRequest request)
 {
     return new ClanGetBaseDataResult
     {
         Result = new ServiceResult<List<ClanBaseDataVersioned>>
         {
             Data = new List<ClanBaseDataVersioned>
             {
                 new ClanBaseDataVersioned
                 {
                     Clan = new ClanId
                     {
                         Id = 1
                     },
                     Version = 0,
                     BaseData = new ClanBaseData
                     {
                         Name = "ClanName",
                         Description = "Description",
                         Tag = "ClanTag"
                     }
                 }
             }
         }
     };
 }
コード例 #2
0
        public ClanGetBaseDataResult ClanGetBaseData(ClanGetBaseDataRequest request)
        {
            var clanBaseData = (request.Clans.Select(c => c.Id)
                .Select(clanId => _clanRepository.FindByIdAsync(clanId).Result)
                .Where(clan => clan != null)
                .Select(clan => new ClanBaseDataVersioned
                {
                    Clan = new ClanId(clan.ClanId),
                    Version = _version++,
                    BaseData = new ClanBaseData
                    {
                        Name = clan.Name,
                        Description = clan.Description,
                        Tag = clan.Tag
                    }
                }));

            return new ClanGetBaseDataResult
            {
                Result = new ServiceResult<List<ClanBaseDataVersioned>>
                {
                    Data = clanBaseData.ToList()
                }
            };
        }
コード例 #3
0
        public ClanGetBaseDataResult ClanGetBaseData(ClanGetBaseDataRequest request)
        {
            var clanBaseData = (request.Clans.Select(c => c.Id)
                                .Select(clanId => _clanRepository.FindByIdAsync(clanId).Result)
                                .Where(clan => clan != null)
                                .Select(clan => new ClanBaseDataVersioned
            {
                Clan = new ClanId(clan.ClanId),
                Version = _version++,
                BaseData = new ClanBaseData
                {
                    Name = clan.Name,
                    Description = clan.Description,
                    Tag = clan.Tag
                }
            }));

            return(new ClanGetBaseDataResult
            {
                Result = new ServiceResult <List <ClanBaseDataVersioned> >
                {
                    Data = clanBaseData.ToList()
                }
            });
        }