public JsonResult loadorg(int idUniv) { IserviceOrganization spo = new serviceOrganization(); return(Json(spo.GetMany(x => x.idUniv == idUniv).Select(s => new { Id = s.idorg, Name = s.orgname }).ToList(), JsonRequestBehavior.AllowGet)); }
public ActionResult AddOrganization(organization org, int univ) { org.idUniv = univ; IserviceOrganization spo = new serviceOrganization(); spo.Add(org); spo.Commit(); return(RedirectToAction("Organizations")); }