protected override void OnSetUp() { session = OpenSession(); tran = session.BeginTransaction(); // save some data Document doc = new Document(1, "test doc"); Image img = new Image(1, doc, "c:\a.jpg"); Paragraph para = new Paragraph(2, doc, "Arial"); Page p1 = new Page(1, doc); p1.IsActive = true; Page p2 = new Page(2, doc); p2.IsActive = false; Review r = new Review(10, doc, "this is a good document"); // this id is 10 on purpose (to be != docId) session.Save(doc); session.Save(img); session.Save(para); session.Save(p1); session.Save(p2); session.Save(r); session.Flush(); session.Clear(); }
public Image(int elementId, Document document, string img) { this.img = img; this.elementId = elementId; this.document = document; }
public Paragraph(int elementId, Document document, string font) { this.font = font; this.elementId = elementId; this.document = document; }
public Review(int reviewId, Document document, string content) { this.reviewId = reviewId; this.document = document; this.content = content; }
public Page(int pageId, Document document) { this.pageId = pageId; this.document = document; pages = new List<Page>(); }
public Page(int pageId, Document document) { this.pageId = pageId; this.document = document; pages = new ArrayList(); }