public async Task <IActionResult> Create([Bind("Id,VideoFile,VideoURL,Description,Photo1,Photo2,Photo3,Photo4,Photo5,SlotCode,GameId")] OfferViewModel model)
        {
            if (ModelState.IsValid)
            {
                try
                {
                    _offerService.BeginTransaction();
                    var offer = _offerService.Get(x => x.GameId == model.GameId);
                    if (offer != null)
                    {
                        offer.Description = model.Description;
                        offer.SlotCode    = model.SlotCode;
                        offer.VideoURL    = model.VideoURL;
                        if (model.Photo1 != null)
                        {
                            offer.Photo1 = helper.GetFileName(model.Photo1);
                            await helper.FileUploadAsync(model.Photo1, offer.Photo1, "Offer");
                        }
                        if (model.Photo2 != null)
                        {
                            offer.Photo2 = helper.GetFileName(model.Photo2);
                            await helper.FileUploadAsync(model.Photo2, offer.Photo2, "Offer");
                        }
                        if (model.Photo3 != null)
                        {
                            offer.Photo3 = helper.GetFileName(model.Photo3);
                            await helper.FileUploadAsync(model.Photo3, offer.Photo3, "Offer");
                        }
                        if (model.Photo4 != null)
                        {
                            offer.Photo4 = helper.GetFileName(model.Photo4);
                            await helper.FileUploadAsync(model.Photo4, offer.Photo4, "Offer");
                        }
                        if (model.Photo5 != null)
                        {
                            offer.Photo5 = helper.GetFileName(model.Photo5);
                            await helper.FileUploadAsync(model.Photo5, offer.Photo5, "Offer");
                        }
                        if (model.VideoFile != null)
                        {
                            offer.VideoName = helper.GetFileName(model.VideoFile);
                            await helper.FileUploadAsync(model.VideoFile, offer.VideoName, "Offer");
                        }
                        _offerService.Update(offer);
                    }
                    else
                    {
                        var newOffer = helper.GetOffer(model);
                        newOffer.Id = _offerService.Add(newOffer);
                        await helper.FileUploadAsync(model.Photo1, newOffer.Photo1, "Offer");

                        await helper.FileUploadAsync(model.Photo2, newOffer.Photo2, "Offer");

                        await helper.FileUploadAsync(model.Photo3, newOffer.Photo3, "Offer");

                        await helper.FileUploadAsync(model.Photo4, newOffer.Photo4, "Offer");

                        await helper.FileUploadAsync(model.Photo5, newOffer.Photo5, "Offer");

                        await helper.FileUploadAsync(model.VideoFile, newOffer.VideoName, "Offer");
                    }
                    _offerService.CommitTransaction();
                    return(RedirectToAction(nameof(Index), new { GameId = model.GameId }));
                }
                catch (Exception ex)
                {
                    _offerService.RollbackTransaction();
                }
            }
            return(View(model));
        }