public void Remove(IList <Photo> photos) { var noOfPhotos = photos.Count(); for (int i = 0; i < noOfPhotos; i++) { context.Remove(photos[i]); } }
// 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); }
public void Remove(Vehicle vehicle) { context.Remove(vehicle); }
public void Remove(PlanningAppState planningAppState) { vegaDbContext.Remove(planningAppState); }
public void Remove(PessoaFisica pessoaFisica) { context.Remove(pessoaFisica); }
public void DeleteVehicle(Vehicle vehicle) { context.Remove(vehicle); }
public void Remove(PessoaJuridica pessoaJuridica) { context.Remove(pessoaJuridica); }
public void Remove(Vehicle vehicle) { vegaDbContext.Remove(vehicle); }
public void Delete <T>(T entity) where T : class { _context.Remove(entity); }