Esempio n. 1
0
        public void Remove(IList <Photo> photos)
        {
            var noOfPhotos = photos.Count();

            for (int i = 0; i < noOfPhotos; i++)
            {
                context.Remove(photos[i]);
            }
        }
Esempio n. 2
0
        // public async Task UpdateAsync (Vehicle vehicle) {
        //     var vehicle = await this.GetVehicleAsync (id);

        //     if (vehicle == null) {
        //         return NotFound ();
        //     }
        //     mapper.Map<SaveVehicleResource, Vehicle> (vehicleResource, vehicle);
        //     vehicle.LastUpdate = DateTime.Now;

        //  //   await this.context.SaveChangesAsync ();

        // }

        public async Task <bool> DeleteVehicle(int id)
        {
            var vehicle = await this.context.Vehicles.FindAsync(id);

            if (vehicle == null)
            {
                return(false);
            }
            context.Remove(vehicle);
            //    await this.context.SaveChangesAsync ();
            return(true);
        }
Esempio n. 3
0
 public void Remove(Vehicle vehicle)
 {
     context.Remove(vehicle);
 }
Esempio n. 4
0
 public void Remove(PlanningAppState planningAppState)
 {
     vegaDbContext.Remove(planningAppState);
 }
Esempio n. 5
0
 public void Remove(PessoaFisica pessoaFisica)
 {
     context.Remove(pessoaFisica);
 }
Esempio n. 6
0
 public void DeleteVehicle(Vehicle vehicle)
 {
     context.Remove(vehicle);
 }
Esempio n. 7
0
 public void Remove(PessoaJuridica pessoaJuridica)
 {
     context.Remove(pessoaJuridica);
 }
Esempio n. 8
0
        public void Remove(Vehicle vehicle)
        {
            vegaDbContext.Remove(vehicle);

        }
 public void Delete <T>(T entity) where T : class
 {
     _context.Remove(entity);
 }