public void Create(string planFile) { XDocument planDefinition = GetPlanXDocument(planFile); PlanEntity plan = GetPlanInformationFromXDocument(planDefinition); if (PlanDA.Retrieve(plan.PlanID) != null) { throw new AppException(String.Format("the given plan '{0}' already exists", plan.PlanID)); } plan.Status = EntityStatus.Active; plan.UpdateTime = DateTime.Now; using (TransactionScope ts = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions() { IsolationLevel = System.Transactions.IsolationLevel.RepeatableRead })) { long planID = PlanDA.Create(plan); plan.ID = planID; BuildPlanScriptReference(plan); ts.Complete(); } }
public void RetrieveTest() { PlanDA.Retrieve("TA-P02"); }