public IActionResult OrderNowSubmit(Order order) { var user = aartistRepository.GetIdentityUserByUsurName(User.Identity.Name); var client = aartistRepository.GetClient(user.Id); aartistRepository.AddOrder(new Orders { IdAtris = order.IdArtist, IdClient = client.Id, IdCity = aartistRepository.SearchCity(order.City).FirstOrDefault().Id, IfApprovedOrder = false, IfPaid = false, Price = order.Price, DateEvent = order.DateTimeEvent, OrderDate = DateTime.Now, }); emailSender.SendEmailAsync(user.Email, " הזמנת אומן לאיורע בתאריך" + order.DateTimeEvent.ToString(), "<h1>הזמנה באתר booking artist</h1>" + "<hr/>" + $"<h4>עיר: {order.City}</h4>" + $"<h4>שם אומן {order.NameArtist}</h4>" + "<h4></h4>" + $"<a href='http://bookingtestsite.azurewebsites.net/home/Orders'>youer order</a>"); return(RedirectToAction("Client")); }