/// <summary> /// /// </summary> /// <typeparam name="T"></typeparam> /// <param name="m"></param> /// <param name="p"></param> /// <returns></returns> public static T GetProperty <T>(DomainModel m, string p) where T : new() { var dict = ((IDictionary <String, object>)m.Bag); var hasKey = dict.TryGetValue(p, out object res); if (!hasKey) { return(default);
/// <summary> /// /// </summary> /// <param name="m"></param> /// <param name="propertyName"></param> /// <returns></returns> public static bool HasProperty(DomainModel m, string propertyName) { return(HasProperty(m.Bag, propertyName)); }