コード例 #1
0
        public async Task Summon(OoiRequest legion)
        {
            var dragonSoul = await(from deamonSoul in _dbContext.Set <Ooi>()
                                   where deamonSoul.UniqueIdentifier == legion.UniqueIdentifier
                                   select deamonSoul).FirstOrDefaultAsync();

            if (dragonSoul == null)
            {
                dragonSoul = new Ooi()
                {
                    UniqueIdentifier = legion.UniqueIdentifier
                };
                _dbContext.Set <Ooi>().Add(dragonSoul);
            }

            dragonSoul.CurrentLat     = legion.CurrentLat;
            dragonSoul.CurrentLng     = legion.CurrentLng;
            dragonSoul.DestinationLat = legion.DestinationLat;
            dragonSoul.DestinationLng = legion.DestinationLng;
            dragonSoul.Name           = legion.Name;
            dragonSoul.Speed          = legion.Speed;
            dragonSoul.Type           = legion.Type;

            await _dbContext.SaveChangesAsync();
        }
コード例 #2
0
 public async Task Azshara([FromBody] OoiRequest legion)
 {
     await _eternityBusiness.Summon(legion);
 }