public void SaveTrackback(TrackBackDto trackBack, int itemId) { if (trackBack == null) { throw new ArgumentNullException("trackBack", "The trackBack must be contains a valid instance"); } if (itemId < 1) { throw new ArgumentException("The Id must be greater than 0", "itemId"); } Post post = this.Session .Include <Post>(x => x.TrackbacksId) .Load <Post>(itemId); if (post == null) { throw new DexterPostNotFoundException(itemId); } ItemTrackbacks trackbacks = this.Session.Load <ItemTrackbacks>(post.TrackbacksId) ?? new ItemTrackbacks { Item = new ItemReference { Id = post.Id, Status = post.Status, ItemPublishedAt = post.PublishAt } }; trackbacks.AddTrackback(trackBack.MapTo <Trackback>(), trackBack.Status); this.Session.Store(trackbacks); post.TrackbacksId = trackbacks.Id; this.Session.Store(post); }