Exemplo n.º 1
0
        public int Delete(int id)
        {
            Route_detail deleteRoute = this.db.RouteDetails.SingleOrDefault(r => r.RouteId == id);

            this.db.RouteDetails.Remove(deleteRoute);
            return(this.db.SaveChanges());
        }
Exemplo n.º 2
0
        public int Update(Route_detail route)
        {
            Route_detail updateRoute = this.db.RouteDetails.SingleOrDefault(r => r.RouteId == route.RouteId);

            updateRoute.RouteId    = route.RouteId;
            updateRoute.Deparature = route.Deparature;
            updateRoute.Deparature = route.Deparature;
            updateRoute.Arrival    = route.Arrival;
            updateRoute.Rent       = route.Rent;
            return(this.db.SaveChanges());
        }
Exemplo n.º 3
0
 public int Insert(Route_detail route)
 {
     this.db.RouteDetails.Add(route);
     return(this.db.SaveChanges());
 }