/// <summary> /// Create a new instance of a Project Snapshot. /// </summary> /// <param name="context"></param> /// <param name="id"></param> /// <param name="projectId"></param> /// <param name="snapshotOn"></param> /// <returns></returns> public static Entity.ProjectSnapshot CreateProjectSnapshot(this PimsContext context, int id, int projectId = 0, DateTime?snapshotOn = null, Agency agency = null) { var projectSnapshot = EntityHelper.CreateProjectSnapshot(id, projectId, snapshotOn, agency); context.ProjectSnapshots.Add(projectSnapshot); return(projectSnapshot); }