コード例 #1
0
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public InteractionEvent(InteractionEventType interactionEventType, string interactionEventTitle, DateTime interactionEventDate) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.InteractionEventID     = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.InteractionEventTypeID = interactionEventType.InteractionEventTypeID;
     this.InteractionEventType   = interactionEventType;
     interactionEventType.InteractionEvents.Add(this);
     this.InteractionEventTitle = interactionEventTitle;
     this.InteractionEventDate  = interactionEventDate;
 }
コード例 #2
0
 public static void DeleteInteractionEventType(this IQueryable <InteractionEventType> interactionEventTypes, InteractionEventType interactionEventTypeToDelete)
 {
     DeleteInteractionEventType(interactionEventTypes, new List <InteractionEventType> {
         interactionEventTypeToDelete
     });
 }
コード例 #3
0
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static InteractionEvent CreateNewBlank(InteractionEventType interactionEventType)
 {
     return(new InteractionEvent(interactionEventType, default(string), default(DateTime)));
 }