BIMToolkitAPIClient.Controllers.PropertyController.Index C# (CSharp) Method

Index() public method

public Index ( ) : System.Web.Mvc.ActionResult
return System.Web.Mvc.ActionResult
        public ActionResult Index()
        {
            var model = new Properties();
            var propertyJson = ApiAccess.CallApi(string.Format("properties/properties"));
            model.PropertiesList.AddRange(JsonConvert.DeserializeObject<List<Property>>(propertyJson));

            //for this simple example, we are just going to send the raw json data back to the view with a bit of formatting
            //model.Json = JsonConvert.SerializeObject(model.PropertiesList, Formatting.Indented);

            return View(model);
        }