コード例 #1
0
        // GET: PartnerInterno/Edit/5
        public ActionResult EditarPartnerInterno(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            var direccion = _direccionRepository.ObtenerTodasLasDireccionesPrincipales().First(d => d.PartnerId == id);
            var partner   = _partnerRepository.ObtenerPartnersInternos().First(p => p.Id == Guid.Parse(id));

            partner.DireccionPrincipal = direccion;


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

            return(View(partner));
        }