Beispiel #1
0
        public void Archive(ISession session, Album album, AlbumDiff diff, AlbumArchiveReason reason, string notes = "")
        {
            var agentLoginData = SessionHelper.CreateAgentLoginData(session, PermissionContext);
            var archived       = ArchivedAlbumVersion.Create(album, diff, agentLoginData, reason, notes);

            session.Save(archived);
        }
Beispiel #2
0
        public void Archive(IRepositoryContext <Album> ctx, Album album, AlbumDiff diff, AlbumArchiveReason reason, string notes = "")
        {
            var agentLoginData = ctx.CreateAgentLoginData(PermissionContext);
            var archived       = ArchivedAlbumVersion.Create(album, diff, agentLoginData, reason, notes);

            ctx.OfType <ArchivedAlbumVersion>().Save(archived);
        }
Beispiel #3
0
        public async Task <ArchivedAlbumVersion> ArchiveAsync(IDatabaseContext <Album> ctx, Album album, AlbumDiff diff, AlbumArchiveReason reason, string notes = "")
        {
            var agentLoginData = ctx.CreateAgentLoginData(PermissionContext);
            var archived       = ArchivedAlbumVersion.Create(album, diff, agentLoginData, reason, notes);
            await ctx.SaveAsync(archived);

            return(archived);
        }