/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary> /// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param> /// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns> internal static new RelationCollection GetRelationsForField(string fieldName) { RelationCollection toReturn = new RelationCollection(); switch (fieldName) { case "Message": toReturn.Add(Relations.MessageEntityUsingMessageID); break; default: toReturn = AuditDataCoreEntity.GetRelationsForField(fieldName); break; } return(toReturn); }
/// <summary>Creates a new, empty AuditDataCoreEntity object.</summary> /// <returns>A new, empty AuditDataCoreEntity object.</returns> public override IEntity Create() { IEntity toReturn = new AuditDataCoreEntity(); // __LLBLGENPRO_USER_CODE_REGION_START CreateNewAuditDataCore // __LLBLGENPRO_USER_CODE_REGION_END return toReturn; }
/// <summary> /// Audits the login of the user with the id specified. /// </summary> /// <param name="userID">User ID.</param> /// <returns>true if the save was successful, false otherwise</returns> public static bool AuditLogin(int userID) { AuditDataCoreEntity toLog = new AuditDataCoreEntity(); toLog.AuditActionID = (int)AuditActions.AuditLogin; toLog.UserID = userID; toLog.AuditedOn = DateTime.Now; return toLog.Save(); }