Ejemplo n.º 1
0
        public async Task <int> AddPhotosToRecord(IDataItemWithMultiplePhotos record, List <IFormFile> files)
        {
            List <string> errors       = new List <string>();
            var           addingPhotos = this.savePhotosToStorage(record, files, true, true);

            if (addingPhotos.Count == 0)
            {
                return(0);
            }

            foreach (var photo in addingPhotos)
            {
                record.Photos.Add(photo);
            }
            await SaveAll();

            if (record.MainPhotoId == null)
            {
                record.MainPhotoId = addingPhotos[0].Id;
                await SaveAll();
            }
            return(addingPhotos.Count());
        }
Ejemplo n.º 2
0
 public Task <int> AddPhotosToRecord(IDataItemWithMultiplePhotos record, List <IFormFile> files)
 {
     throw new System.NotImplementedException();
 }