public ActionResult GetAll()
        {
            DealStateRepository repository = new DealStateRepository();

            ModelState.Clear();
            return(View(repository.GetAll()));
        }
        // GET: Deal/Edit/5
        public ActionResult Edit(int id)
        {
            DealRepository        repository     = new DealRepository();
            AuctionRepository     auctionRep     = new AuctionRepository();
            ParticipantRepository participantRep = new ParticipantRepository();
            DealStateRepository   dealStateRep   = new DealStateRepository();
            ItemRepository        itemRep        = new ItemRepository();

            DealModel model = repository.GetById(id);

            model.Auctions   = auctionRep.GetAll();
            model.Buyers     = participantRep.GetAll();
            model.Sellers    = participantRep.GetAll();
            model.DealStates = dealStateRep.GetAll();
            model.Items      = itemRep.GetAll();

            return(View(model));
        }
        // GET: Deal/Create
        public ActionResult Create()
        {
            AuctionRepository     auctionRep     = new AuctionRepository();
            ParticipantRepository participantRep = new ParticipantRepository();
            DealStateRepository   dealStateRep   = new DealStateRepository();
            ItemRepository        itemRep        = new ItemRepository();

            DealModel model = new DealModel
            {
                Auctions   = auctionRep.GetAll(),
                Buyers     = participantRep.GetAll(),
                Sellers    = participantRep.GetAll(),
                DealStates = dealStateRep.GetAll(),
                Items      = itemRep.GetAll()
            };

            return(View(model));
        }
        // GET: Deal/Create
        public ActionResult NewDeal(int id)
        {
            AuctionRepository     auctionRep     = new AuctionRepository();
            ParticipantRepository participantRep = new ParticipantRepository();
            DealStateRepository   dealStateRep   = new DealStateRepository();
            ItemRepository        itemRep        = new ItemRepository();

            DealModel model = new DealModel
            {
                Auctions   = auctionRep.GetAll(),
                Buyers     = participantRep.GetAll(),
                Sellers    = participantRep.GetAll(),
                DealStates = dealStateRep.GetAll(),
                Items      = itemRep.GetAll("GetAvailableItems")
            };

            ViewBag.Id = id;
            return(View(model));
        }