Пример #1
0
        /// <summary>
        /// Mise à jour du modèle
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public override BaseCRUD Update(BaseCRUD originalEntity)
        {
            if (originalEntity is Aircraft aircraft)
            {
                this.Flights    = aircraft.Flights;
                this.RowVersion = Guid.NewGuid();
            }

            return(this);
        }
Пример #2
0
        /// <summary>
        /// Mise à jour du modèle
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public override BaseCRUD Update(BaseCRUD originalEntity)
        {
            if (originalEntity is Airport airport)
            {
                this.FlightsDeparture   = airport.FlightsDeparture;
                this.FlightsDestination = airport.FlightsDestination;
                this.RowVersion         = Guid.NewGuid();
            }

            return(this);
        }
Пример #3
0
        /// <summary>
        /// Mise à jour du modèle
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public override BaseCRUD Update(BaseCRUD originalEntity)
        {
            if (originalEntity is Flight flight)
            {
                // Il n'est pas possible de changer d'avion car cela complexifie trop l'exercice à cause du nombre de passagers à gérer
                this.AircraftGuid = flight.AircraftGuid;
                this.RowVersion   = Guid.NewGuid();
            }

            return(this);
        }
Пример #4
0
 public abstract BaseCRUD Update(BaseCRUD originalEntity);