protected override void Initialize(HttpControllerContext controllerContext) { base.Initialize(controllerContext); StaticValueProviderFactory.Clear(); StaticValueProviderFactory.Add("Name", "张三"); StaticValueProviderFactory.Add("PhoneNo", "123456789"); StaticValueProviderFactory.Add("EmailAddress", "*****@*****.**"); StaticValueProviderFactory.Add("Address.Province", "江苏省"); StaticValueProviderFactory.Add("Address.City", "苏州市"); StaticValueProviderFactory.Add("Address.District", "工业园区"); StaticValueProviderFactory.Add("Address.Street", "星湖街328号"); }
protected override void Initialize(HttpControllerContext controllerContext) { base.Initialize(controllerContext); StaticValueProviderFactory.Clear(); StaticValueProviderFactory.Add("[0].Name", "张三"); StaticValueProviderFactory.Add("[0].PhoneNo", "123"); StaticValueProviderFactory.Add("[0].EmailAddress", "*****@*****.**"); StaticValueProviderFactory.Add("[1].Name", "李四"); StaticValueProviderFactory.Add("[1].PhoneNo", "456"); StaticValueProviderFactory.Add("[1].EmailAddress", "*****@*****.**"); StaticValueProviderFactory.Add("[2].Name", "王五"); StaticValueProviderFactory.Add("[2].PhoneNo", "789"); StaticValueProviderFactory.Add("[2].EmailAddress", "*****@*****.**"); }