public TestViewModel(Test test) : base() { Id = test.Id; Name = test.Name; Items = new List<object>(); }
protected override void BeforeNavigation(NavigationContext context) { int chosenId = (int)context.Parameters["id"]; test = testsService.Get(chosenId); Identity = string.Format("{0}.{1}.{2}.{3}", Importance, Id, ParentId, TopmostParentId); Importance = 3; Id = test.Id; ParentId = test.ScenarioId; TopmostParentId = test.Scenario.ProjectId; Name = test.Name; }
public bool Add(Test obj) { return repository.Add(obj); }