Created
August 27, 2015 20:24
-
-
Save ebalders/8c04a64516aeb8437cc0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foreach (var lp in c.LessonPlans) | |
{ | |
var copy = new LessonPlan(lp.Name, lp.Organization) | |
{ | |
Association = lp.Association, | |
Category = lp.Category, | |
Class = null, | |
Course = c2, | |
Description = lp.Description, | |
EstimatedDate = lp.EstimatedDate, | |
EstimatedTime = lp.EstimatedTime, | |
OrderNumber = lp.OrderNumber | |
}; | |
var files = new FileDao(Session).GetForObject(lp).Execute(Session).ToList(); | |
var bll = new FileBll(Session); | |
foreach (var of in files) | |
{ | |
Object2File o2f = new Object2File(copy, of.File); | |
Session.Save(o2f); | |
} | |
Session.Save(copy); | |
c2.LessonPlans.Add(copy); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment