1 using System; 2 using System.Web.Http; 3 using Common; 4 5 namespace ConsoleApp 6 { 7 internal class Program 8 { 9 private static void Main(string[] args) 10 { 11 var configuration = new HttpConfiguration(); 12 var metaDataProvider = configuration.Services.GetModelMetadataProvider(); 13 Console.WriteLine("{0,-14}{1,-15}{2,-26}{3}", "PropertyName", "Description", "ConvertEmptyStringToNull", "IsReadOnly"); 14 foreach (var data in metaDataProvider.GetMetadataForType(null, typeof (Contact)).Properties) 15 { 16 Console.WriteLine("{0,-14}{1,-15}{2,-26}{3}", data.PropertyName, data.Description, data.ConvertEmptyStringToNull, data.IsReadOnly); 17 } 18 Console.Read(); 19 } 20 } 21 }