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();
            }
        }
示例#2
0
 public TripData(Trip trip, IList<Photo> photos)
 {
     Trip = trip;
     Photos = photos as List<Photo>;
     CurrentPhotoIndex = 0;
 }