public void InsertRange(IEnumerable <Entities.SearchItemCategory> searchItemCategories)
        {
            if (searchItemCategories == null)
            {
                throw new ArgumentNullException("searchItemCategories");
            }

            base.DbSet.InsertAllOnSubmit(DataModelFactory.Create(searchItemCategories));
        }
        public void RemoveRange(IEnumerable <Entities.PlaceOfInterestCategory> placeOfInterestCategories)
        {
            if (placeOfInterestCategories == null)
            {
                throw new ArgumentNullException("placeOfInterestCategories");
            }

            base.DbSet.DeleteAllOnSubmit(placeOfInterestCategories.Select(x => DataModelFactory.Create(x)));
        }
        public void InsertRange(IEnumerable <Entities.PlaceOfInterestCategory> placeOfInterestCategories)
        {
            if (placeOfInterestCategories == null)
            {
                throw new ArgumentNullException("placeOfInterestCategories");
            }

            base.DbSet.InsertAllOnSubmit(DataModelFactory.Create(placeOfInterestCategories));
        }
        public void RemoveRange(IEnumerable <Entities.SearchItemCategory> searchItemCategories)
        {
            if (searchItemCategories == null)
            {
                throw new ArgumentNullException("searchItemCategories");
            }

            base.DbSet.DeleteAllOnSubmit(searchItemCategories.Select(x => DataModelFactory.Create(x)));
        }
Exemplo n.º 5
0
        public void Insert(Entities.Recent recentTrip)
        {
            if (base.DbSet.Any(x => x.Latitude == recentTrip.Point.Latitude && x.Longitude == recentTrip.Point.Longitude))
            {
                Recent existingRecentTrip = base.DbSet.Where(x => x.Latitude == recentTrip.Point.Latitude && x.Longitude == recentTrip.Point.Longitude).FirstOrDefault();

                existingRecentTrip.NumberOfUses += 1;
                existingRecentTrip.LastUsedDate  = recentTrip.LastUsedDate;
            }
            else
            {
                base.DbSet.InsertOnSubmit(DataModelFactory.Create(recentTrip));
            }
        }
Exemplo n.º 6
0
        public bool Insert(Entities.Favourite favourite)
        {
            if (Exists(favourite))
            {
                return(false);
            }

            Recent existingRecentTrip = base.DbSet.Where(x => x.Latitude == favourite.Point.Latitude && x.Longitude == favourite.Point.Longitude).FirstOrDefault();

            if (existingRecentTrip != null)
            {
                existingRecentTrip.IsFavourite = true;
            }
            else
            {
                base.DbSet.InsertOnSubmit(DataModelFactory.Create(favourite));
            }

            return(true);
        }
 public void Insert(DrumbleApp.Shared.Entities.CacheSetting cacheSetting)
 {
     base.DbSet.InsertOnSubmit(DataModelFactory.Create(cacheSetting));
 }
Exemplo n.º 8
0
 public void Insert(DrumbleApp.Shared.Entities.Weather weather)
 {
     base.DbSet.InsertOnSubmit(DataModelFactory.Create(weather));
 }
 public void Insert(Entities.PublicStop publicStop)
 {
     base.DbSet.InsertOnSubmit(DataModelFactory.Create(publicStop));
 }
Exemplo n.º 10
0
 public void InsertRange(IEnumerable <DrumbleApp.Shared.Entities.PublicTransportOperator> publicTransportOperators)
 {
     base.DbSet.InsertAllOnSubmit(DataModelFactory.Create(publicTransportOperators));
 }
Exemplo n.º 11
0
 public void Insert(DrumbleApp.Shared.Entities.PublicTransportOperator publicTransportOperator)
 {
     base.DbSet.InsertOnSubmit(DataModelFactory.Create(publicTransportOperator));
 }
Exemplo n.º 12
0
 public void Insert(Entities.User user)
 {
     base.DbSet.InsertOnSubmit(DataModelFactory.Create(user));
 }
 public void Insert(DrumbleApp.Shared.Entities.TransportMode transportMode)
 {
     base.DbSet.InsertOnSubmit(DataModelFactory.Create(transportMode));
 }
Exemplo n.º 14
0
 public void InsertRange(IEnumerable <Entities.PublicStop> publicStops)
 {
     base.DbSet.InsertAllOnSubmit(DataModelFactory.Create(publicStops));
 }
Exemplo n.º 15
0
 public void Insert(DrumbleApp.Shared.Entities.Path path)
 {
     base.DbSet.InsertOnSubmit(DataModelFactory.Create(path));
 }
Exemplo n.º 16
0
 public void Insert(DrumbleApp.Shared.Entities.UberTrip uberTrip)
 {
     base.DbSet.InsertOnSubmit(DataModelFactory.Create(uberTrip));
 }
Exemplo n.º 17
0
 public void Insert(Entities.OperatorSetting operatorSetting)
 {
     base.DbSet.InsertOnSubmit(DataModelFactory.Create(operatorSetting));
 }