public JsonResult GetPartners(string id) { Session["ProductTypeSelecc"] = id; if (id != null && !String.IsNullOrEmpty(id)) { var listPartners = _service.GetPartnersByIdProductType(id); return(Json(new SelectList(listPartners, "IdPartner", "Name"))); } else { return(Json(new SelectList(new List <PARTNER>()))); } }