private void ConnectionPhotos(PresentationExModel model)
 {
     foreach (var a in model.Photos)
     {
         var photo = AspNetPhotos.Where(p => p.PhotoId == a.PhotoId).FirstOrDefault();
         if (photo != null)
         {
             photo.PresentationId = a.PresentationId;
             photo.PositionNumber = a.PositionNumber;
         }
     }
 }
        private List <PresentationExModel> GetAllPresentationComplette(List <PresentationModel> presentations)
        {
            var presentationsList = new List <PresentationExModel>();

            foreach (var a in presentations)
            {
                presentationsList.Add(new PresentationExModel()
                {
                    PresentationId = a.PresentationId,
                    UserId         = a.UserId,
                    Photos         = AspNetPhotos.Where(p => p.PresentationId == a.PresentationId).OrderBy(p => p.PositionNumber).ToList(),
                    PathBeginPhoto = a.PathBeginPhoto
                });
            }

            return(presentationsList);
        }
 public List <PhotoModel> GetPhotosUserNotPresentation(String userId)
 {
     return(AspNetPhotos.Where(p => (p.UserId == userId && p.PresentationId == null)).ToList());
 }
 public List <PhotoModel> GetAllPhotosUser(String userId)
 {
     return(AspNetPhotos.Where(p => p.UserId == userId).ToList());
 }
 public String GetPathPhoto(String photoId)
 {
     return(AspNetPhotos.Where(p => p.PhotoId == photoId).FirstOrDefault().PhotoPath);
 }