public static Standard Map(AcademicBenchmarkConnector.Models.Standard model) { return(new Standard { Id = model.Id, Description = model.Description, IsActive = model.IsActive, DocumentRef = model.Document.Id, CourseRef = model.Course.Id, IsDeepest = model.IsDeepest, AuthorityRef = model.Authority.Id, ParentRef = model.Parent?.Id, AdoptYear = int.Parse(model.AdoptYear), DateModified = model.DateModified, GradeLevelHiRef = model.GradeLevel.High, GradeLevelLoRef = model.GradeLevel.Low, Label = model.Label, Level = model.Level, Number = model.Number, Seq = model.Seq, SubjectDocRef = model.SubjectDocument.Id, // We need broad, because subjects have sub tree, and we don't // know about child subjects anything. So we take parent subject SubjectRef = model.Subject.Broad, //!!! Version = model.Version }); }
protected Standard(AcademicBenchmarkConnector.Models.Standard standard) : base(standard) { if (standard.Authority != null) { Authority = new Authority { Id = standard.Authority.Id, Code = standard.Authority.Code, Description = standard.Authority.Description } } ; if (standard.Document != null) { Document = new Document { Id = standard.Document.Id, Description = standard.Document.Title, Code = standard.Document.Code } } ; }
public static Standard Create(AcademicBenchmarkConnector.Models.Standard standard) { return(new Standard(standard)); }