protected override T CreateOneItem <T>(int id, string name, ContentItem parent) { var item = base.CreateOneItem <T>(id, name, parent); repository.Save(item); return(item); }
public void CanSaveDetail() { IRepository <N2.Details.ContentDetail> detailRepository = new NHRepository <N2.Details.ContentDetail>(sessionProvider); using (repository) { ContentItem item = CreateOneItem <Definitions.PersistableItem1>(0, "item", null); item["TheString"] = "the string"; repository.Save(item); repository.Flush(); } using (detailRepository) { Assert.AreEqual(1, detailRepository.Count()); } }