コード例 #1
0
        public JsonResult GetSupplierNameReturnGUID(string Prefix)
        {
            //Note : you can bind same list from database
            List <Supplier> ObjList = new List <Supplier>();
            DA_Supplier     daMT    = new DA_Supplier();

            ObjList = daMT.GetAllSuppliers();
            //Searching records from list using LINQ query
            var CityList = (from N in ObjList
                            where N.SupplierName.ToLower().Contains(Prefix.ToLower())
                            select new { N.SupplierName, N.GUID });

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