Exemplo n.º 1
0
        public void CreateTrip(string path, string title, string description)
        {
            using (var context = new PhotoContext())
            {
                var trip = new Trip
                               {
                                   Description = description,
                                   RootPath = path,
                                   TripName = title,
                               };
                context.Trips.Add(trip);

                context.SaveChanges();
            }
        }
Exemplo n.º 2
0
 public TripData(Trip trip, IList<Photo> photos)
 {
     Trip = trip;
     Photos = photos as List<Photo>;
     CurrentPhotoIndex = 0;
 }