示例#1
0
        public ActionResult NetWork()
        {
            Response.Headers.Add("content-type", "application/json");
            List <IpWork> nets = new List <IpWork>();

            using (AppDb context = AppDb.Create())
            {
                var n = Networks.OneByName(context, Net);
                if (n == null)
                {
                    throw new Exception("Network is not found");
                }
                nets.Add(NetworkModul.GetNet(n.Id));
            }

            return(Json(nets, JsonRequestBehavior.AllowGet));
        }