public void CreateVehicleModel(IVehicleModel model)
        {
            var vehicleMake = context.VehicleMakes.First(c => c.Id == model.MakeId);

            vehicleMake.VehicleModels.Add(AutoMapper.Mapper.Map <VehicleModel>(model));
            context.SaveChanges();
        }
Example #2
0
 public void CreateVehicleMake(IVehicleMake make)
 {
     context.VehicleMakes.Add(AutoMapper.Mapper.Map <VehicleMake>(make));
     context.SaveChanges();
 }