public ActionResult OpenSale(SalesModel model) { var Musteriler = _serviceCustomers.GetAll().Select(x => new SelectListItem { Text = x.Name + " " + x.Surname, Value = x.Id.ToString() }).ToList(); var Personeller = _serviceEmployees.GetAll().Select(x => new SelectListItem { Text = x.Name + " " + x.Surname, Value = x.Id.ToString() }).ToList(); ViewBag.Musteriler = Musteriler; ViewBag.Personeller = Personeller; model.IsActive = true; model.IsCollect = false; model.IsSale = false; model.ReserveDate = DateTime.Now.Date; Sales sale = model.ModelToEnity(); _serviceSales.Insert(sale); var satis = _serviceSales.GetById(sale.Id); return(RedirectToAction("RoomSalesInsert", new { id = satis.Id })); }