public IActionResult CreatePromotion([FromBody] PromotionDto promotionDto) { var promotionDtos = _mapper.Map <PromotionDto>(promotionDto); var promotion = _promotionService.Create(promotionDtos); var promotionToConsoles = _promotionService.AddPromCons(promotion.Id, promotionDtos.Consoles); return(Ok(new { Id = promotion.Id, PromotionName = promotion.PromotionName, PromitionDesc = promotion.PromotionDesc, Type = promotion.Price, AllTime = promotion.AllTime, DateStart = promotion.DateStart, DateEnd = promotion.DateEnd, HourStart = promotion.HourStart, HourEnd = promotion.HourEnd, PromCons = promotionToConsoles })); }