Esempio n. 1
0
        /// <summary>
        ///   Creates the next StorageItemVersion for this object. Doesn't save the database
        /// </summary>
        public async Task <StorageItemVersion> CreateNextVersion(ApplicationDbContext database)
        {
            var number = await GetNextVersionNumber(database);

            var version = new StorageItemVersion()
            {
                Version       = number,
                StorageItemId = Id
            };

            StorageItemVersions.Add(version);

            await database.StorageItemVersions.AddAsync(version);

            return(version);
        }
        public void OnVersionUploadFinished(StorageItemVersion uploadedVersion)
        {
            uploadedVersion.Uploading = false;

            Uploading = false;
        }