internal static bool EntityContainsTimeStamp(Type EntityType, QDataDataContext CurrentContext) { return(CurrentContext.Mapping.MappingSource.GetModel(CurrentContext.GetType()).GetMetaType(EntityType).DataMembers.Where(dm => dm.IsVersion == true).FirstOrDefault() != null); }
internal static string GetPrimaryKeyName(Type EntityType, QDataDataContext CurrentContext) { return((from m in CurrentContext.Mapping.MappingSource.GetModel(CurrentContext.GetType()).GetMetaType(EntityType).DataMembers where m.IsPrimaryKey == true select m.Name).FirstOrDefault()); }