public ActionResult Create(ProductsViewModel model)
 {
     if (ModelState.IsValid)
     {
         int currentUserId = userService.GetByPredicate(u => u.Login == User.Identity.Name).FirstOrDefault().Id;
         var product = new ProductEntity()
         {
             Auction_Cost = model.Auction_Cost,
             AuctionStart = DateTime.Now,
             AuctionEnd = model.AuctionEnd,
             Description = model.Description,
             Seller_Id = currentUserId,
             Customer_Id = currentUserId
         };
         service.Create(product);
         return RedirectToAction("Index");
     }
     return View(model);
 }
 public ActionResult Details()
 {
     string id = (string)RouteData.Values["id"];
     if (id == null)
         return RedirectToAction("Index");
     ProductEntity prodEntity = service.GetById(Int32.Parse(id));
     ProductsViewModel product = new ProductsViewModel()
     {
         Auction_Cost = prodEntity.Auction_Cost,
         AuctionEnd = prodEntity.AuctionEnd,
         Description = prodEntity.Description
     };
     return View(product);
 }