public static Guid SafeGetId(this IExposesId source) { if (source == null) { return(Guid.Empty); } return(source.Id); }
public static T SafeGetId <T>(this IExposesId <T> source) { if (source == null) { return(default(T)); } return(source.Id); }
public static bool IsNew <T>(this IExposesId <T> source) { return(IsNullOrEmptyId(source.Id)); }
public static bool IsNew(this IExposesId source) { return(source.Id == Guid.Empty); }