partial void Merge(GenericConsumable entity, ItemDTO dto, object state) { var consumableDto = dto.Consumable; if (consumableDto == null) { return; } entity.Effect = consumableDto.Description; double duration; if (double.TryParse(consumableDto.Duration, out duration)) { entity.Duration = TimeSpan.FromMilliseconds(duration); } }
partial void Merge(GenericConsumable entity, ItemDTO dto, object state) { var details = dto.Details; if (details == null) { return; } var duration = details.Duration; if (duration.HasValue) { entity.Duration = TimeSpan.FromMilliseconds(duration.Value); } entity.Effect = details.Description; }