/// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static GrantAllocationProgramIndexProjectCode CreateNewBlank(GrantAllocation grantAllocation, ProgramIndex programIndex)
 {
     return(new GrantAllocationProgramIndexProjectCode(grantAllocation, programIndex));
 }
Exemple #2
0
 public static void DeleteProgramIndex(this IQueryable <ProgramIndex> programIndices, ProgramIndex programIndexToDelete)
 {
     DeleteProgramIndex(programIndices, new List <ProgramIndex> {
         programIndexToDelete
     });
 }
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public GrantAllocationProgramIndexProjectCode(GrantAllocation grantAllocation, ProgramIndex programIndex) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.GrantAllocationProgramIndexProjectCodeID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.GrantAllocationID = grantAllocation.GrantAllocationID;
     this.GrantAllocation   = grantAllocation;
     grantAllocation.GrantAllocationProgramIndexProjectCodes.Add(this);
     this.ProgramIndexID = programIndex.ProgramIndexID;
     this.ProgramIndex   = programIndex;
     programIndex.GrantAllocationProgramIndexProjectCodes.Add(this);
 }