Beispiel #1
0
        public void EditMake(VehicleMakeVM VehicleMakeVM)
        {
            // db.Entry(Mapper.Map<VehicleMake>(VehicleMakeVM)).State = EntityState.Modified;
            //db.SaveChanges();

            db.Set <VehicleMake>().AddOrUpdate(Mapper.Map <VehicleMake>(VehicleMakeVM));
            db.SaveChanges();
        }
Beispiel #2
0
 // update
 public void UpdateVehicleMake(VehicleMake vehicleMake)
 {
     db.Set <VehicleMake>().AddOrUpdate(Mapper.Map <VehicleMake>(vehicleMake));
     db.SaveChanges();
 }