public ActionResult GetByName(string key, string name, int agencyId) { var obj = key != Keyapi ? new Base.Category() : _da.GetByName(name, agencyId); return(Json(obj, JsonRequestBehavior.AllowGet)); }