public static T GetObjectWithOnlyId <T>(int id) where T : ObjectRemap, new() { T obj = new T(); GenericModelHelper.SetPropValue(obj, "Id", id); return(obj); }
public static int GetSafeId <T>(T obj) where T : ObjectRemap { return((obj == null) ? 0 : int.Parse(GenericModelHelper.GetPropValue <T>(obj, "Id").ToString())); }
public static string GetSafeSId <T>(T obj) where T : ObjectRemap { return((obj == null) ? "0" : GenericModelHelper.GetPropValue <T>(obj, "Id").ToString()); }