Пример #1
0
        // GET: Partners
        public ActionResult Index()
        {
            var partnersVM = new List <Partner>();

            foreach (var partner in partnersRepositories.GetAll())
            {
                var partnerVM = PartnerMap.PartnerToPartnerVM(partner);
            }

            return(View(partnersVM));
        }
Пример #2
0
        // GET: Partners/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Partner partner = partnersRepositories.GetById(id.Value);

            if (partner == null)
            {
                return(HttpNotFound());
            }

            var partnerVM = PartnerMap.PartnerToPartnerVM(partner);

            return(View(partnerVM));
        }