public string Serialize <T>(T obj, params string[] properties) where T : new() { string result; if (properties.Length > 0) { result = NewtonsoftJsonHelper.Serialize(obj, new DynamicContractResolver <T>(properties)); } else { result = NewtonsoftJsonHelper.Serialize(obj); } return(result); }
public string SerializeObject(object obj) { string result = NewtonsoftJsonHelper.Serialize(obj, new NHibernateContractResovler()); return(result); }